forked from eranif/codelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalgrindprocessor.h
100 lines (90 loc) · 3.44 KB
/
valgrindprocessor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// Copyright : (C) 2015 Eran Ifrah
// File name : valgrindprocessor.h
//
// -------------------------------------------------------------------------
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
/**
* @file
* @author pavel.iqx
* @date 2014
* @copyright GNU General Public License v2
*/
#ifndef _VALGRINDPROCESSOR_H_
#define _VALGRINDPROCESSOR_H_
#include <wx/xml/xml.h>
#include "imemcheckprocessor.h"
/**
* @class ValgrindMemcheckProcessor
* @brief Implementation of valgrind's memcheck tool parser
*
* Settings for this parset is implemented in global settings. It could be moved here or to own file.
*/
class ValgrindMemcheckProcessor:public IMemCheckProcessor
{
public:
/**
* @brief interface implementation, does nothing more than inherited ctor
* @param settings
*/
ValgrindMemcheckProcessor(MemCheckSettings * const settings);
/**
* @brief interface implementation
* @return list of supp files
*
* Some files are specified in setting. Workspace specific supp file need to be named just before analyse run, according to current opened workspace.
*/
virtual wxArrayString GetSuppressionFiles();
/**
* @brief interface implementation
* @param originalCommand
* @return
*
* Takes original command and prepend it with Valgrind command and its arguments.
*/
virtual wxString GetExecutionCommand(const wxString & originalCommand);
/**
* @brief interface implementation
* @param outputLogFileName
* @return
*
* Loads Valgrind's xml log to wxXmlDocument, and goes trought nodes
*/
virtual bool Process(const wxString & outputLogFileName = wxEmptyString);
protected:
/**
* @brief creates one MemCheckError object
* @param doc whole log document
* @param errorNode reference to current processed node in that doc file
* @return MemCheckError object
*
* Auxiliary section is not in subnode. First part of the node describes particular error, second part describes auxiliary info. For auxiliary is created sub MemCheckError object.
*/
MemCheckError ProcessError(wxXmlDocument & doc, wxXmlNode * errorNode);
/**
* @brief creates one MemCheckErrorLocation object
* @param doc whole log document
* @param locationNode reference to current processed node in that doc file
* @return MemCheckErrorLocation object
*/
MemCheckErrorLocation ProcessLocation(wxXmlDocument & doc, wxXmlNode * locationNode);
};
#endif // _VALGRINDPROCESSOR_H_