[alleyoop] Added support for --track-origins
- From: Jeffrey Stedfast <fejj src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [alleyoop] Added support for --track-origins
- Date: Mon, 23 Nov 2009 15:25:29 +0000 (UTC)
commit 17ae34cc0ac58b0ba71d87b3c4eedf0204468f94
Author: Jeffrey Stedfast <fejj gnome org>
Date: Mon Nov 23 10:23:55 2009 -0500
Added support for --track-origins
2009-11-23 Jeffrey Stedfast <fejj novell com>
* src/vggeneralprefs.c (vg_general_prefs_init): Added new widget
to control the --track-origins Valgrind option, thanks to a
patch
by Gérald Fauvelle.
(general_args): Change the default value of the --num-callers
argument to 0 so that if it somehow gets set to 0, it gets
ignored
rather than passing --num-callers=0 and causing Valgrind to
error
out.
ChangeLog | 10 ++++++++++
src/alleyoop.schemas | 11 +++++++++++
src/vggeneralprefs.c | 12 +++++++++++-
src/vggeneralprefs.h | 2 +-
4 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6ff9c4d..3803392 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-23 Jeffrey Stedfast <fejj novell com>
+
+ * src/vggeneralprefs.c (vg_general_prefs_init): Added new widget
+ to control the --track-origins Valgrind option, thanks to a patch
+ by Gérald Fauvelle.
+ (general_args): Change the default value of the --num-callers
+ argument to 0 so that if it somehow gets set to 0, it gets ignored
+ rather than passing --num-callers=0 and causing Valgrind to error
+ out.
+
2009-11-09 Jeffrey Stedfast <fejj novell com>
* src/vggeneralprefs.c (general_prefs_get_argv): Don't bother with
diff --git a/src/alleyoop.schemas b/src/alleyoop.schemas
index 203b8d0..6186769 100644
--- a/src/alleyoop.schemas
+++ b/src/alleyoop.schemas
@@ -105,6 +105,17 @@
</schema>
<schema>
+ <key>/schemas/apps/alleyoop/valgrind/general/track-origins</key>
+ <applyto>/apps/alleyoop/valgrind/general/track-origins</applyto>
+ <owner>alleyoop</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Track origins of undefined values</short>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/alleyoop/valgrind/general/time-stamp</key>
<applyto>/apps/alleyoop/valgrind/general/time-stamp</applyto>
<owner>alleyoop</owner>
diff --git a/src/vggeneralprefs.c b/src/vggeneralprefs.c
index 3624c01..158b09e 100644
--- a/src/vggeneralprefs.c
+++ b/src/vggeneralprefs.c
@@ -43,6 +43,7 @@
#endif
#define TRACE_CHILDREN_KEY "/apps/alleyoop/valgrind/general/trace-children"
#define TRACK_FDS_KEY "/apps/alleyoop/valgrind/general/track-fds"
+#define TRACK_ORIGINS_KEY "/apps/alleyoop/valgrind/general/track-origins"
#define TIME_STAMP_KEY "/apps/alleyoop/valgrind/general/time-stamp"
#define RUN_LIBC_FREERES_KEY "/apps/alleyoop/valgrind/general/run-libc-freeres"
#define SUPPRESSIONS_KEY "/apps/alleyoop/valgrind/general/suppressions"
@@ -228,6 +229,14 @@ vg_general_prefs_init (VgGeneralPrefs *prefs)
gtk_widget_show (widget);
gtk_box_pack_start ((GtkBox *) vbox, widget, FALSE, FALSE, 0);
+ bool = gconf_client_get_bool (gconf, TRACK_ORIGINS_KEY, NULL);
+ widget = gtk_check_button_new_with_label (_("Track rigins of undefined values"));
+ g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), TRACK_ORIGINS_KEY);
+ gtk_toggle_button_set_active ((GtkToggleButton *) widget, bool);
+ prefs->track_origins = (GtkToggleButton *) widget;
+ gtk_widget_show (widget);
+ gtk_box_pack_start ((GtkBox *) vbox, widget, FALSE, FALSE, 0);
+
bool = gconf_client_get_bool (gconf, TIME_STAMP_KEY, NULL);
widget = gtk_check_button_new_with_label (_("Add time stamps to log messages"));
g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), TIME_STAMP_KEY);
@@ -313,13 +322,14 @@ static struct {
int dval;
} general_args[] = {
{ DEMANGLE_KEY, "--demangle", NULL, ARG_TYPE_BOOL, 1 },
- { NUM_CALLERS_KEY, "--num-callers", NULL, ARG_TYPE_INT, 4 },
+ { NUM_CALLERS_KEY, "--num-callers", NULL, ARG_TYPE_INT, 0 },
{ ERROR_LIMIT_KEY, "--error-limit", NULL, ARG_TYPE_BOOL, 1 },
#ifdef SLOPPY_MALLOC
{ SLOPPY_MALLOC_KEY, "--sloppy-malloc", NULL, ARG_TYPE_BOOL, 0 },
#endif
{ TRACE_CHILDREN_KEY, "--trace-children", NULL, ARG_TYPE_BOOL, 0 },
{ TRACK_FDS_KEY, "--track-fds", NULL, ARG_TYPE_BOOL, 0 },
+ { TRACK_ORIGINS_KEY, "--track-origins", NULL, ARG_TYPE_BOOL, 0 },
{ TIME_STAMP_KEY, "--time-stamp", NULL, ARG_TYPE_BOOL, 0 },
{ RUN_LIBC_FREERES_KEY, "--run-libc-freeres", NULL, ARG_TYPE_BOOL, 0 },
{ SUPPRESSIONS_KEY, "--suppressions", NULL, ARG_TYPE_STRING, 0 },
diff --git a/src/vggeneralprefs.h b/src/vggeneralprefs.h
index 9603500..66cfb45 100644
--- a/src/vggeneralprefs.h
+++ b/src/vggeneralprefs.h
@@ -47,9 +47,9 @@ struct _VgGeneralPrefs {
GtkSpinButton *num_callers;
GtkToggleButton *error_limit;
GtkToggleButton *sloppy_malloc;
- /*GtkOptionMenu *alignment;*/ /* 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096 */
GtkToggleButton *trace_children;
GtkToggleButton *track_fds;
+ GtkToggleButton *track_origins;
GtkToggleButton *time_stamp;
GtkToggleButton *run_libc_freeres;
GnomeFileEntry *suppressions;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]