~ubuntu-branches/ubuntu/oneiric/valkyrie/oneiric

« back to all changes in this revision

Viewing changes to valkyrie/core/memcheck_object.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2011-09-02 22:08:34 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: package-import@ubuntu.com-20110902220834-kigsixteppj9epp5
Tags: 2.0.0-0ubuntu1
* New upstream release. (LP: #635129, LP: #832886, LP: #721298)
* Standards bumped to 3.9.2, no changes required.
* d/control, d/rules: cdbs removed, dh minimal rule instead.
* d/control: build system is qmake not autotools
* d/control: bump required qt to qt4
* d/valkyrie.install: installing html docs manually as make install
  no longer does so.
* d/patches/valkyrie-2.0.0-fix-doc.dir.patch: Fix doc path to match
  policy. Also corrects LP: #588074 since the documentation link now
  works.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* --------------------------------------------------------------------- 
2
 
 * Definition of class Memcheck                        memcheck_object.h
3
 
 * Memcheck-specific options / flags / fns
4
 
 * ---------------------------------------------------------------------
5
 
 * This file is part of Valkyrie, a front-end for Valgrind
6
 
 * Copyright (C) 2000-2008, OpenWorks LLP <info@open-works.co.uk>
7
 
 * This program is released under the terms of the GNU GPL v.2
8
 
 * See the file COPYING for the full license details.
9
 
 */
10
 
 
11
 
#ifndef __MEMCHECK_OBJECT_H
12
 
#define __MEMCHECK_OBJECT_H
13
 
 
14
 
 
15
 
#include "tool_object.h"
16
 
#include "memcheck_view.h"
17
 
#include "memcheck_options_page.h"
18
 
#include "vk_logpoller.h"
19
 
 
20
 
#include "vglogreader.h"
21
 
#include "vk_process.h"
22
 
 
23
 
 
24
 
/* class Memcheck ------------------------------------------------------ */
25
 
class Memcheck : public ToolObject
26
 
{
27
 
   Q_OBJECT
28
 
 
29
 
public:
30
 
   Memcheck( int objId );
31
 
   ~Memcheck();
32
 
 
33
 
   /* returns the ToolView window (memcheckView) for this tool */
34
 
   ToolView* createView( QWidget* parent );
35
 
   /* called by MainWin::closeToolView() */
36
 
   bool queryDone();
37
 
 
38
 
   bool start( VkRunState::State rm, QStringList vgflags );
39
 
   void stop();
40
 
 
41
 
   /* check argval for this option, updating if necessary.
42
 
      called by parseCmdArgs() and gui option pages */
43
 
   int checkOptArg( int optid, QString& argval );
44
 
 
45
 
   enum mcOpts { 
46
 
      LEAK_CHECK,
47
 
      LEAK_RES,
48
 
      SHOW_REACH,
49
 
      //UNDEF_VAL,
50
 
      TRACK_ORI,
51
 
      PARTIAL,
52
 
      FREELIST,
53
 
      GCC_296,
54
 
      ALIGNMENT,
55
 
      NUM_OPTS
56
 
   };
57
 
   unsigned int maxOptId() { return NUM_OPTS; }
58
 
 
59
 
   OptionsPage* createOptionsPage( OptionsWindow* parent ) {
60
 
      return (OptionsPage*)new MemcheckOptionsPage( parent, this );
61
 
   }
62
 
 
63
 
   /* returns a list of non-default flags to pass to valgrind */
64
 
   QStringList modifiedVgFlags();
65
 
 
66
 
public slots:
67
 
   bool fileSaveDialog( QString fname=QString() );
68
 
 
69
 
private:
70
 
   /* overriding to avoid casting everywhere */
71
 
   MemcheckView* view() { return (MemcheckView*)m_view; }
72
 
 
73
 
   void statusMsg(  QString hdr, QString msg );
74
 
   bool queryFileSave();
75
 
   bool saveParsedOutput( QString& fname );
76
 
 
77
 
   bool runValgrind( QStringList vgflags );  // RM_Valgrind
78
 
   bool parseLogFile();                      // RM_Tool0
79
 
   bool mergeLogFiles();                     // RM_Tool1
80
 
   bool startProcess( QStringList flags );
81
 
 
82
 
private slots:
83
 
   void processDone();
84
 
   void readVgLog();
85
 
 
86
 
private:
87
 
   QString      m_saveFname;
88
 
   VgLogReader* m_vgreader;
89
 
   VKProcess*   m_vgproc;
90
 
   VkLogPoller* m_logpoller;
91
 
};
92
 
 
93
 
 
94
 
#endif