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

« back to all changes in this revision

Viewing changes to valkyrie/core/valgrind_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 Valgrind                        valgrind_object.h
3
 
 * Valgrind-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 __VALGRIND_OBJECT_H
12
 
#define __VALGRIND_OBJECT_H
13
 
 
14
 
 
15
 
#include "vk_objects.h"
16
 
#include "valgrind_options_page.h"
17
 
#include "tool_object.h"
18
 
 
19
 
 
20
 
/* class Valgrind ------------------------------------------------------ */
21
 
class Valgrind : public VkObject
22
 
{
23
 
public:
24
 
   Valgrind();
25
 
   ~Valgrind();
26
 
 
27
 
   /* returns a list of non-default flags to pass to valgrind */
28
 
   QStringList modifiedVgFlags( const ToolObject* tool_obj );
29
 
 
30
 
   /* check argval for this option, updating if necessary.
31
 
      called by parseCmdArgs() and gui option pages */
32
 
   int checkOptArg( int optid, QString& argval );
33
 
 
34
 
   enum vgOpts {
35
 
      TOOL,           // --tool
36
 
      /* common options relevant to all tools */
37
 
      VERBOSITY,      // --verbosity
38
 
      TRACE_CH,       // --trace-children
39
 
      SILENT_CH,      // --child-silent-after-fork
40
 
      TRACK_FDS,      // --track-fds
41
 
      TIME_STAMP,     // --time-stamp
42
 
      LOG_FD,         // --log-fd
43
 
      LOG_FILE,       // --log-file
44
 
      LOG_SOCKET,     // --log-socket
45
 
 
46
 
      /* uncommon options relevant to all tools */
47
 
      RUN_LIBC,       // --run-libc-freeres
48
 
      SIM_HINTS,      // --sim-hints
49
 
      KERN_VAR,       // --kernel-variant
50
 
      EM_WARNS,       // --show-emwarns
51
 
      SMC_CHECK,      // --smc-check
52
 
 
53
 
      /* options relevant to error-reporting tools */
54
 
      XML_OUTPUT,     // --xml
55
 
      XML_COMMENT,    // -- xml-user-comment
56
 
      DEMANGLE,       // --demangle
57
 
      NUM_CALLERS,    // --num-callers
58
 
      ERROR_LIMIT,    // --error-limit
59
 
      SHOW_BELOW,     // --show-below-main
60
 
 
61
 
      /* suppressions hackery */
62
 
      SUPPS_DIRS,     /* list of suppfile dirs - feeds SUPPS_AVAIL list */
63
 
      SUPPS_AVAIL,    /* fake opt: dyname list of available supp files */
64
 
      SUPPS_SEL,      /* the currently selected suppression(s) */
65
 
 
66
 
      /* misc */
67
 
      GEN_SUPP,       // --gen-suppressions
68
 
      DB_ATTACH,      // --db-attach
69
 
      DB_COMMAND,     // --db-command
70
 
      INPUT_FD,       // --input-fd
71
 
      MAX_SFRAME,     // --max-stackframe
72
 
      NUM_OPTS
73
 
   };
74
 
   unsigned int maxOptId() { return NUM_OPTS; }
75
 
 
76
 
   OptionsPage* createOptionsPage( OptionsWindow* parent ) {
77
 
      return (OptionsPage*)new ValgrindOptionsPage( parent, this );
78
 
   }
79
 
 
80
 
public:
81
 
   /* ToolObject access */
82
 
   ToolObjList toolObjList();
83
 
   int         toolObjId( const QString& name );
84
 
   ToolObject* toolObj( int tid );
85
 
   ToolObject* toolObj( const QString& name );
86
 
 
87
 
private:
88
 
   /* creates the various VkObjects and initialises their options,
89
 
      ready for cmd-line parsing (if any). */
90
 
   void initToolObjects();
91
 
 
92
 
   ToolObjList m_toolObjList;  /* Tools */
93
 
};
94
 
 
95
 
 
96
 
#endif