[alleyoop] Added support for --track-origins
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [alleyoop] Added support for --track-origins
- Date: Mon, 6 Dec 2010 20:08:01 +0000 (UTC)
commit 0711485fd82c5beeb58bebf72245a4a5de8ea53a
Author: Jeffrey Stedfast <fejj gnome org>
Date: Mon Dec 6 15:02:10 2010 -0500
Added support for --track-origins
2010-12-06 Jeffrey Stedfast <fejj novell com>
* src/vgmemcheckprefs.c: Added support for Memcheck's
--track-origins flag.
ChangeLog | 5 +++++
src/alleyoop.schemas | 11 +++++++++++
src/vghelgrindprefs.c | 2 +-
src/vgmemcheckprefs.c | 11 +++++++++++
src/vgmemcheckprefs.h | 1 +
5 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f422fe2..2b58ed4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-06 Jeffrey Stedfast <fejj novell com>
+
+ * src/vgmemcheckprefs.c: Added support for Memcheck's
+ --track-origins flag.
+
2010-02-03 Jeffrey Stedfast <fejj novell com>
* configure.in: Add -fno-strict-aliasing to CFLAGS.
diff --git a/src/alleyoop.schemas b/src/alleyoop.schemas
index 6186769..ab5cba9 100644
--- a/src/alleyoop.schemas
+++ b/src/alleyoop.schemas
@@ -228,6 +228,17 @@
</schema>
<schema>
+ <key>/schemas/apps/alleyoop/valgrind/memcheck/track-origins</key>
+ <applyto>/apps/alleyoop/valgrind/memcheck/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/memcheck/workaround-gcc296-bugs</key>
<applyto>/apps/alleyoop/valgrind/memcheck/workaround-gcc296-bugs</applyto>
<owner>alleyoop</owner>
diff --git a/src/vghelgrindprefs.c b/src/vghelgrindprefs.c
index 2985271..7b8c9c3 100644
--- a/src/vghelgrindprefs.c
+++ b/src/vghelgrindprefs.c
@@ -110,7 +110,7 @@ static char *
decode_hex_value (const char *text)
{
unsigned long int retval;
- const char *inend;
+ char *inend;
retval = strtoul (text, &inend, 16);
if (inend == text)
diff --git a/src/vgmemcheckprefs.c b/src/vgmemcheckprefs.c
index 393bb6e..0149e94 100644
--- a/src/vgmemcheckprefs.c
+++ b/src/vgmemcheckprefs.c
@@ -44,6 +44,7 @@
//#define ENABLE_FREE_FILL_KEY "/apps/alleyoop/valgrind/memcheck/enable-free-fill"
#define FREE_FILL_KEY "/apps/alleyoop/valgrind/memcheck/free-fill"
#define WORKAROUND_GCC296_BUGS_KEY "/apps/alleyoop/valgrind/memcheck/workaround-gcc296-bugs"
+#define TRACK_ORIGINS_KEY "/apps/alleyoop/valgrind/memcheck/track-origins"
static void vg_memcheck_prefs_class_init (VgMemcheckPrefsClass *klass);
static void vg_memcheck_prefs_init (VgMemcheckPrefs *prefs);
@@ -408,6 +409,15 @@ vg_memcheck_prefs_init (VgMemcheckPrefs *prefs)
gtk_box_pack_start ((GtkBox *) vbox, hbox, FALSE, FALSE, 0);
g_free (str);
+ /* --track-origins */
+ bool = gconf_client_get_bool (gconf, TRACK_ORIGINS_KEY, NULL);
+ widget = gtk_check_button_new_with_label (_("Track origins 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);
+
/* --workaround-gcc296-bugs */
bool = gconf_client_get_bool (gconf, WORKAROUND_GCC296_BUGS_KEY, NULL);
widget = gtk_check_button_new_with_label (_("Work around bugs generated by gcc 2.96"));
@@ -467,6 +477,7 @@ static struct {
{ IGNORE_RANGES_KEY, "--ignore-ranges", MEMCHECK, NULL, ARG_TYPE_STRING, 0 },
{ MALLOC_FILL_KEY, "--malloc-fill", MEMCHECK, NULL, ARG_TYPE_STRING, 0 },
{ FREE_FILL_KEY, "--free-fill", MEMCHECK, NULL, ARG_TYPE_STRING, 0 },
+ { TRACK_ORIGINS_KEY, "--track-origins", MEMCHECK, NULL, ARG_TYPE_BOOL, 0, },
{ WORKAROUND_GCC296_BUGS_KEY, "--workaround-gcc296-bugs", BOTH, NULL, ARG_TYPE_BOOL, 0 },
};
diff --git a/src/vgmemcheckprefs.h b/src/vgmemcheckprefs.h
index f361a00..f698143 100644
--- a/src/vgmemcheckprefs.h
+++ b/src/vgmemcheckprefs.h
@@ -48,6 +48,7 @@ struct _VgMemcheckPrefs {
GtkEntry *ignore_ranges;
GtkEntry *malloc_fill;
GtkEntry *free_fill;
+ GtkToggleButton *track_origins;
GtkToggleButton *workaround_gcc296_bugs;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]