Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2015-11-24 14:13:47 +0000
committerRoland Grunberg2015-11-24 16:17:26 +0000
commit9e58ce9396cd0e65f88f4b7ad076f52890dab88a (patch)
treeb1652b0889c72826bd2481ade8e82a9b55b39ba0
parent727d121f1b0ce416ca00a634a2192ff8f75c6095 (diff)
downloadorg.eclipse.linuxtools-9e58ce9396cd0e65f88f4b7ad076f52890dab88a.tar.gz
org.eclipse.linuxtools-9e58ce9396cd0e65f88f4b7ad076f52890dab88a.tar.xz
org.eclipse.linuxtools-9e58ce9396cd0e65f88f4b7ad076f52890dab88a.zip
Bug 482906 - Valgrind cannot load logs when program crashes
- filter out core file from the list of log files Change-Id: Id582852ffd838603aae5ed050d8847595059a54d Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com> Reviewed-on: https://git.eclipse.org/r/61141 Tested-by: Hudson CI Reviewed-by: Roland Grunberg <rgrunber@redhat.com>
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
index f456358f12..7f0366e534 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
@@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Stack;
+import java.util.regex.Pattern;
import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
@@ -67,10 +68,11 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
private static final String EQUALS = "="; //$NON-NLS-1$
private static final String LOG_FILE = CommandLineConstants.LOG_PREFIX + "%p.txt"; //$NON-NLS-1$
+ private static final Pattern CORE_PATTERN = Pattern.compile("^.*\\.txt\\.core\\.[0-9]+$"); //$NON-NLS-1$
private static final FileFilter LOG_FILTER = new FileFilter() {
@Override
public boolean accept(File pathname) {
- return pathname.getName().startsWith(CommandLineConstants.LOG_PREFIX);
+ return pathname.getName().startsWith(CommandLineConstants.LOG_PREFIX) && !CORE_PATTERN.matcher(pathname.getName()).matches();
}
};

Back to the top