aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Henrique Debonzi2011-07-08 11:22:59 (EDT)
committerAndrew Overholt2011-07-08 15:10:44 (EDT)
commitba34c1cbd8fb91f59dd1e45928043bfa4138132c (patch)
tree11f7f2ad78f65fe84df90d79796395d485dfd00a
parentd0fea49875559c1846b6456b90105f8b666ce7f3 (diff)
downloadorg.eclipse.linuxtools-ba34c1cbd8fb91f59dd1e45928043bfa4138132c.zip
org.eclipse.linuxtools-ba34c1cbd8fb91f59dd1e45928043bfa4138132c.tar.gz
org.eclipse.linuxtools-ba34c1cbd8fb91f59dd1e45928043bfa4138132c.tar.bz2
Valgrind 3.6 memcheck new options included.
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckCommandConstants.java6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchConstants.java19
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java14
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckPlugin.java11
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckToolPage.java162
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/messages.properties7
6 files changed, 219 insertions, 0 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckCommandConstants.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckCommandConstants.java
index f683f80..6a2311a 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckCommandConstants.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckCommandConstants.java
@@ -23,4 +23,10 @@ public final class MemcheckCommandConstants {
// VG >= 3.4.0
public static final String OPT_TRACKORIGINS = "--track-origins"; //$NON-NLS-1$
+
+ // VG >= 3.6.0
+ public static final String OPT_SHOW_POSSIBLY_LOST = "--show-possibly-lost"; //$NON-NLS-1$
+ public static final String OPT_IGNORERANGES = "--ignore-ranges"; //$NON-NLS-1$
+ public static final String OPT_MALLOCFILL = "--malloc-fill"; //$NON-NLS-1$
+ public static final String OPT_FREEFILL = "--free-fill"; //$NON-NLS-1$
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchConstants.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchConstants.java
index b15a292..c8c85d3 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchConstants.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchConstants.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.valgrind.memcheck;
+import java.util.Collections;
+import java.util.List;
+
public final class MemcheckLaunchConstants {
// LaunchConfiguration attributes
public static final String ATTR_MEMCHECK_LEAKCHECK = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_LEAKCHECK"; //$NON-NLS-1$
@@ -25,6 +28,14 @@ public final class MemcheckLaunchConstants {
// VG >= 3.4.0
public static final String ATTR_MEMCHECK_TRACKORIGINS = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_TRACKORIGINS"; //$NON-NLS-1$
+ // VG >= 3.6.0
+ public static final String ATTR_MEMCHECK_POSSIBLY_LOST_BOOL = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_POSSIBLY_LOST"; //$NON-NLS-1$
+ public static final String ATTR_MEMCHECK_MALLOCFILL_BOOL = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_MALLOCFILL_BOOL"; //$NON-NLS-1$
+ public static final String ATTR_MEMCHECK_MALLOCFILL_VAL = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_MALLOCFILL_VAL"; //$NON-NLS-1$
+ public static final String ATTR_MEMCHECK_FREEFILL_BOOL = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_FREEFILL_BOOL"; //$NON-NLS-1$
+ public static final String ATTR_MEMCHECK_FREEFILL_VAL = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_FREEFILL_VAL"; //$NON-NLS-1$
+ public static final String ATTR_MEMCHECK_IGNORE_RANGES = MemcheckPlugin.PLUGIN_ID + ".MEMCHECK_IGNORE_RANGES"; //$NON-NLS-1$
+
public static final String LEAK_RES_LOW = "low"; //$NON-NLS-1$
public static final String LEAK_RES_MED = "med"; //$NON-NLS-1$
public static final String LEAK_RES_HIGH = "high"; //$NON-NLS-1$
@@ -41,4 +52,12 @@ public final class MemcheckLaunchConstants {
// VG >= 3.4.0
public static final boolean DEFAULT_MEMCHECK_TRACKORIGINS = false;
+
+ // VG >= 3.6.0
+ public static final boolean DEFAULT_MEMCHECK_POSSIBLY_LOST_BOOL = false;
+ public static final boolean DEFAULT_MEMCHECK_MALLOCFILL_BOOL = false;
+ public static final String DEFAULT_MEMCHECK_MALLOCFILL_VAL = "";
+ public static final boolean DEFAULT_MEMCHECK_FREEFILL_BOOL = false;
+ public static final String DEFAULT_MEMCHECK_FREEFILL_VAL = "";
+ public static final List<?> DEFAULT_MEMCHECK_IGNORE_RANGES = Collections.EMPTY_LIST;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java
index e22fb64..a457cfa 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckLaunchDelegate.java
@@ -11,6 +11,7 @@
package org.eclipse.linuxtools.internal.valgrind.memcheck;
import java.util.ArrayList;
+import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -26,10 +27,12 @@ public class MemcheckLaunchDelegate implements IValgrindLaunchDelegate {
private static final String EQUALS = "="; //$NON-NLS-1$
private static final String NO = "no"; //$NON-NLS-1$
private static final String YES = "yes"; //$NON-NLS-1$
+ private static final String HEX = "0x"; //$NON-NLS-1$
public void handleLaunch(ILaunchConfiguration config, ILaunch launch, IPath outDir, IProgressMonitor monitor) throws CoreException {
}
+ @SuppressWarnings("unchecked")
public String[] getCommandArray(ILaunchConfiguration config, Version ver, IPath logDir) throws CoreException {
ArrayList<String> opts = new ArrayList<String>();
@@ -48,7 +51,18 @@ public class MemcheckLaunchDelegate implements IValgrindLaunchDelegate {
if (ver == null || ver.compareTo(VER_3_4_0) >= 0) {
opts.add(MemcheckCommandConstants.OPT_TRACKORIGINS + EQUALS + (config.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_TRACKORIGINS, MemcheckLaunchConstants.DEFAULT_MEMCHECK_TRACKORIGINS) ? YES : NO));
}
+
+ if (config.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_MALLOCFILL_BOOL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_MALLOCFILL_BOOL)) {
+ opts.add(MemcheckCommandConstants.OPT_MALLOCFILL + EQUALS + HEX + config.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_MALLOCFILL_VAL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_MALLOCFILL_VAL));
+ }
+ if (config.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_FREEFILL_BOOL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_FREEFILL_BOOL)) {
+ opts.add(MemcheckCommandConstants.OPT_FREEFILL + EQUALS + HEX + config.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_FREEFILL_VAL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_FREEFILL_VAL));
+ }
+ List<String> ignoreRangesFns = config.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_IGNORE_RANGES, MemcheckLaunchConstants.DEFAULT_MEMCHECK_IGNORE_RANGES);
+ for (String func : ignoreRangesFns) {
+ opts.add(MemcheckCommandConstants.OPT_IGNORERANGES + EQUALS + func);
+ }
return opts.toArray(new String[opts.size()]);
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckPlugin.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckPlugin.java
index ccf02eb..d1dcb24 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckPlugin.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckPlugin.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.valgrind.memcheck;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -54,5 +57,13 @@ public class MemcheckPlugin extends AbstractUIPlugin {
public static MemcheckPlugin getDefault() {
return plugin;
}
+
+ public static FontMetrics getFontMetrics(Control control) {
+ GC gc = new GC(control);
+ gc.setFont(control.getFont());
+ FontMetrics fontMetrics = gc.getFontMetrics();
+ gc.dispose();
+ return fontMetrics;
+ }
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckToolPage.java
index 30d27ce..624cedc 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckToolPage.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/MemcheckToolPage.java
@@ -10,10 +10,15 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.valgrind.memcheck;
+import java.util.Arrays;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -22,13 +27,16 @@ import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.Text;
import org.osgi.framework.Version;
public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements IValgrindToolPage {
@@ -50,6 +58,13 @@ public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements
// VG >= 3.4.0
protected Button trackOriginsButton;
+ protected Button showPossiblyLostButton;
+ protected Button mallocFillButton;
+ protected Text mallocFillText;
+ protected Button freeFillButton;
+ protected Text freeFillText;
+ protected List ignoreRangesList;
+
protected boolean isInitializing = false;
protected Version valgrindVersion;
protected CoreException ex = null;
@@ -144,16 +159,126 @@ public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements
alignmentSpinner.setMinimum(0);
alignmentSpinner.setMaximum(4096);
alignmentSpinner.addModifyListener(modifyListener);
+
+ showPossiblyLostButton = new Button(top, SWT.CHECK);
+ showPossiblyLostButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ showPossiblyLostButton.setText(Messages.getString("MemcheckToolPage.Show_Possibly_Lost")); //$NON-NLS-1$
+ showPossiblyLostButton.addSelectionListener(selectListener);
+
+ Composite mallocFillTop = new Composite(top, SWT.NONE);
+ GridLayout mallocFillLayout = new GridLayout(2, false);
+ mallocFillTop.setLayout(mallocFillLayout);
+ mallocFillTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ mallocFillButton = new Button(mallocFillTop, SWT.CHECK);
+ mallocFillButton.setText(Messages.getString("MemcheckToolPage.Malloc_Fill")); //$NON-NLS-1$
+ mallocFillButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ checkMallocFillEnablement();
+ updateLaunchConfigurationDialog();
+ }
+ });
+ mallocFillText = new Text(mallocFillTop, SWT.BORDER);
+ mallocFillText.setTextLimit(8);
+ mallocFillText.addModifyListener(modifyListener);
+
+
+ Composite freeFillTop = new Composite(top, SWT.NONE);
+ GridLayout freeFillLayout = new GridLayout(2, false);
+ freeFillTop.setLayout(freeFillLayout);
+ freeFillTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ freeFillButton = new Button(freeFillTop, SWT.CHECK);
+ freeFillButton.setText(Messages.getString("MemcheckToolPage.Free_Fill")); //$NON-NLS-1$
+ freeFillButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ checkFreeFillEnablement();
+ updateLaunchConfigurationDialog();
+ }
+ });
+ freeFillText = new Text(freeFillTop, SWT.BORDER);
+ mallocFillText.setTextLimit(8);
+ freeFillText.addModifyListener(modifyListener);
+
+ Composite ignoreRangesTop = new Composite(top, SWT.NONE);
+ ignoreRangesTop.setLayout(new GridLayout(3, false));
+ ignoreRangesTop.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
+
+ Label ignoreRangesLabel = new Label(ignoreRangesTop, SWT.NONE);
+ ignoreRangesLabel.setText(Messages.getString("MemcheckToolPage.Ignore_Ranges")); //$NON-NLS-1$
+ ignoreRangesLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
+
+ createIgnoreRangesControls(ignoreRangesTop);
+}
+
+ private void createIgnoreRangesControls(Composite top) {
+
+ ignoreRangesList = new List(top, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ FontMetrics fm = MemcheckPlugin.getFontMetrics(ignoreRangesList);
+ ignoreRangesList.setLayoutData(new GridData(Dialog.convertWidthInCharsToPixels(fm, 50), Dialog.convertHeightInCharsToPixels(fm, 5)));
+
+ Composite ignoreButtons = new Composite(top, SWT.NONE);
+ GridLayout ignoreButtonsLayout = new GridLayout();
+ ignoreButtonsLayout.marginWidth = ignoreButtonsLayout.marginHeight = 0;
+ ignoreButtons.setLayout(ignoreButtonsLayout);
+ ignoreButtons.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
+
+ Button newButton = new Button(ignoreButtons, SWT.PUSH);
+ newButton.setText(Messages.getString("MemcheckToolPage.New")); //$NON-NLS-1$
+ newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ newButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ handleIgnoreNewButtonPressed();
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ Button removeButton = new Button(ignoreButtons, SWT.PUSH);
+ removeButton.setText(Messages.getString("MemcheckToolPage.Remove")); //$NON-NLS-1$
+ removeButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ removeButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ handleIgnoreRemoveButtonPressed();
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ }
+
+ protected void handleIgnoreNewButtonPressed() {
+ InputDialog dialog = new InputDialog(getShell(), Messages.getString("MemcheckToolPage.Ignore_Ranges"), Messages.getString("MemcheckToolPage.Range"), "", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (dialog.open() == Window.OK) {
+ String function = dialog.getValue();
+ if (!function.equals("")) { //$NON-NLS-1$
+ ignoreRangesList.add(function);
+ }
+ }
+ }
+
+ protected void handleIgnoreRemoveButtonPressed() {
+ int[] selections = ignoreRangesList.getSelectionIndices();
+ ignoreRangesList.remove(selections);
}
private void checkAlignmentEnablement() {
alignmentSpinner.setEnabled(alignmentButton.getSelection());
}
+ private void checkMallocFillEnablement() {
+ mallocFillText.setEnabled(mallocFillButton.getSelection());
+ }
+
+ private void checkFreeFillEnablement() {
+ freeFillText.setEnabled(freeFillButton.getSelection());
+ }
+
public String getName() {
return Messages.getString("MemcheckToolPage.Memcheck_Options"); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
public void initializeFrom(ILaunchConfiguration configuration) {
isInitializing = true;
try {
@@ -172,6 +297,18 @@ public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements
if (valgrindVersion == null || valgrindVersion.compareTo(VER_3_4_0) >= 0) {
trackOriginsButton.setSelection(configuration.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_TRACKORIGINS, MemcheckLaunchConstants.DEFAULT_MEMCHECK_TRACKORIGINS));
}
+
+ showPossiblyLostButton.setSelection(configuration.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_POSSIBLY_LOST_BOOL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_POSSIBLY_LOST_BOOL));
+ mallocFillButton.setSelection(configuration.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_MALLOCFILL_BOOL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_MALLOCFILL_BOOL));
+ checkMallocFillEnablement();
+ mallocFillText.setText(configuration.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_MALLOCFILL_VAL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_MALLOCFILL_VAL));
+ freeFillButton.setSelection(configuration.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_FREEFILL_BOOL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_FREEFILL_BOOL));
+ checkFreeFillEnablement();
+ freeFillText.setText(configuration.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_FREEFILL_VAL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_FREEFILL_VAL));
+ java.util.List<String> ignoreFns = configuration.getAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_IGNORE_RANGES, MemcheckLaunchConstants.DEFAULT_MEMCHECK_IGNORE_RANGES);
+ ignoreRangesList.setItems(ignoreFns.toArray(new String[ignoreFns.size()]));
+
+
} catch (CoreException e) {
ex = e;
}
@@ -192,6 +329,13 @@ public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements
if (valgrindVersion == null || valgrindVersion.compareTo(VER_3_4_0) >= 0) {
configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_TRACKORIGINS, trackOriginsButton.getSelection());
}
+
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_POSSIBLY_LOST_BOOL, showPossiblyLostButton.getSelection());
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_MALLOCFILL_BOOL, mallocFillButton.getSelection());
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_MALLOCFILL_VAL, mallocFillText.getText());
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_FREEFILL_BOOL, freeFillButton.getSelection());
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_FREEFILL_VAL, freeFillText.getText());
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_IGNORE_RANGES, Arrays.asList(ignoreRangesList.getItems()));
}
@Override
@@ -244,6 +388,9 @@ public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements
if (valgrindVersion == null || valgrindVersion.compareTo(VER_3_4_0) >= 0) {
configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_TRACKORIGINS, MemcheckLaunchConstants.DEFAULT_MEMCHECK_TRACKORIGINS);
}
+
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_POSSIBLY_LOST_BOOL, MemcheckLaunchConstants.DEFAULT_MEMCHECK_POSSIBLY_LOST_BOOL);
+ configuration.setAttribute(MemcheckLaunchConstants.ATTR_MEMCHECK_IGNORE_RANGES, MemcheckLaunchConstants.DEFAULT_MEMCHECK_IGNORE_RANGES);
}
public void setValgrindVersion(Version ver) {
@@ -314,4 +461,19 @@ public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements
return trackOriginsButton;
}
+ public Button getShowPossiblyLostButton() {
+ return showPossiblyLostButton;
+ }
+
+ public Text getMallocFillText() {
+ return mallocFillText;
+ }
+
+ public Text getFreeFillText() {
+ return freeFillText;
+ }
+
+ public List getIgnoreRangesList() {
+ return ignoreRangesList;
+ }
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/messages.properties b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/messages.properties
index 0c5d282..3649652 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/messages.properties
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/internal/valgrind/memcheck/messages.properties
@@ -13,3 +13,10 @@ MemcheckToolPage.undef_value_errors=Undefined value errors
MemcheckToolPage.minimum_heap_block=Minimum heap block alignment:
MemcheckToolPage.Track_origins=Track origins of uninitialized values
MemcheckToolPage.Track_origins_needs_undef="{0}" cannot be used without selecting "{1}"
+MemcheckToolPage.Show_Possibly_Lost=Show possibly lost blocks in leak check
+MemcheckToolPage.Ignore_Ranges=Ignore Ranges
+MemcheckToolPage.Range=Range (i.e. 0xPP-0xQQ):
+MemcheckToolPage.New=New
+MemcheckToolPage.Remove=Remove
+MemcheckToolPage.Malloc_Fill=Fill malloc'd areas with given value (0x)
+MemcheckToolPage.Free_Fill=Fill free'd areas with given value (0x)