File indexing completed on 2024-05-19 16:31:12

0001 /******************************************************************
0002  *
0003  * kdbgwin - Helper application for DrKonqi
0004  *
0005  * This file is part of the KDE project
0006  *
0007  * SPDX-FileCopyrightText: 2010 Ilie Halip <lupuroshu@gmail.com>
0008  *
0009  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0010  *****************************************************************/
0011 
0012 #pragma once
0013 
0014 #include "abstract_generator.h"
0015 
0016 const static DWORD MAX_SYMBOL_NAME = 256 * sizeof(TCHAR);
0017 
0018 /**
0019  * \brief Generator for MSVC.
0020  *
0021  * This class implements a backtrace generator for executables created with Microsoft's
0022  * Visual C++. The fundamental difference of executables created with MSVC and MinGW is
0023  * the debugging format. MSVC uses a proprietary debugging format called PDB (Program
0024  * Database), which can be manipulated with DbgHelp API.
0025  *
0026  */
0027 class MsvcGenerator : public AbstractBTGenerator
0028 {
0029     Q_OBJECT
0030 public:
0031     /// Constructor
0032     MsvcGenerator(const Process &process);
0033 
0034     bool Init() override;
0035     void UnInit() override;
0036 
0037     void FrameChanged() override{};
0038 
0039     QString GetFunctionName() override;
0040     QString GetFile() override;
0041     int GetLine() override;
0042 
0043     void LoadSymbol(const QString &module, DWORD64 dwBaseAddr) override;
0044 };