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.
11
#ifndef __VALGRIND_OBJECT_H
12
#define __VALGRIND_OBJECT_H
15
#include "vk_objects.h"
16
#include "valgrind_options_page.h"
17
#include "tool_object.h"
20
/* class Valgrind ------------------------------------------------------ */
21
class Valgrind : public VkObject
27
/* returns a list of non-default flags to pass to valgrind */
28
QStringList modifiedVgFlags( const ToolObject* tool_obj );
30
/* check argval for this option, updating if necessary.
31
called by parseCmdArgs() and gui option pages */
32
int checkOptArg( int optid, QString& argval );
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
43
LOG_FILE, // --log-file
44
LOG_SOCKET, // --log-socket
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
53
/* options relevant to error-reporting tools */
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
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) */
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
74
unsigned int maxOptId() { return NUM_OPTS; }
76
OptionsPage* createOptionsPage( OptionsWindow* parent ) {
77
return (OptionsPage*)new ValgrindOptionsPage( parent, this );
81
/* ToolObject access */
82
ToolObjList toolObjList();
83
int toolObjId( const QString& name );
84
ToolObject* toolObj( int tid );
85
ToolObject* toolObj( const QString& name );
88
/* creates the various VkObjects and initialises their options,
89
ready for cmd-line parsing (if any). */
90
void initToolObjects();
92
ToolObjList m_toolObjList; /* Tools */