File indexing completed on 2024-04-21 16:12:18
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 /** 0017 * \brief Generator for MinGW. 0018 * 0019 * This class allows generating backtraces for executables created with the MinGW compiler. 0020 * It assumes that symbols are stored in .sym files in the same directory as the corresponding 0021 * binary (eg. N:\\kde\\bin\\libkdecore.dll and N:\\kde\\bin\\libkdecore.sym). It uses libbfd to 0022 * find and extract the information it needs from the symbols it loads. 0023 */ 0024 class MingwGenerator : public AbstractBTGenerator 0025 { 0026 Q_OBJECT 0027 protected: 0028 /// The current file 0029 const char *file; 0030 /// The current function 0031 const char *func; 0032 /// The current line 0033 int line; 0034 0035 public: 0036 /// Constructor 0037 MingwGenerator(const Process &process); 0038 0039 bool Init() override; 0040 void UnInit() override; 0041 0042 void FrameChanged() override; 0043 0044 QString GetFunctionName() override; 0045 QString GetFile() override; 0046 int GetLine() override; 0047 0048 void LoadSymbol(const QString &module, DWORD64 dwBaseAddr) override; 0049 };