From 815811f4074d3f4886cf43ff74993234898ea9c8 Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Tue, 24 Oct 2017 14:29:49 +0000 Subject: [PATCH] java_deobfuscate: Update regex for logcat with space before PID Change-Id: I48112c8f4524588bcec5904ba2b049aa711bfea6 Reviewed-on: https://chromium-review.googlesource.com/734239 Reviewed-by: John Budorick Commit-Queue: agrieve Cr-Original-Commit-Position: refs/heads/master@{#511141} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: f7552dac6ef9a55487d337bc903e8b3d8bb479f0 --- .../stacktrace/java/org/chromium/build/FlushingReTrace.java | 4 ++-- android/stacktrace/java_deobfuscate_test.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/android/stacktrace/java/org/chromium/build/FlushingReTrace.java b/android/stacktrace/java/org/chromium/build/FlushingReTrace.java index 8819be8ab..e54054cb2 100644 --- a/android/stacktrace/java/org/chromium/build/FlushingReTrace.java +++ b/android/stacktrace/java/org/chromium/build/FlushingReTrace.java @@ -21,11 +21,11 @@ import proguard.retrace.ReTrace; */ public class FlushingReTrace { // E.g.: D/ConnectivityService(18029): Message - // E.g.: W/GCM (15158): Message + // E.g.: W/GCM ( 151): Message // E.g.: 09-08 14:22:59.995 18029 18055 I ProcessStatsService: Message // E.g.: 09-08 14:30:59.145 17731 18020 D MDnsDS : Message private static final String LOGCAT_PREFIX = - "(?:[VDIWEF]/.*?\\(\\d+\\): |\\d\\d-\\d\\d [0-9:. ]+[VDIWEF] .*?: )?"; + "(?:[VDIWEF]/.*?\\( *\\d+\\): |\\d\\d-\\d\\d [0-9:. ]+[VDIWEF] .*?: )?"; // Note: Order of these sub-patterns defines their precedence. // Note: Deobfuscation of methods without the presense of line numbers basically never works. diff --git a/android/stacktrace/java_deobfuscate_test.py b/android/stacktrace/java_deobfuscate_test.py index c1b79042f..58ab1e8f4 100755 --- a/android/stacktrace/java_deobfuscate_test.py +++ b/android/stacktrace/java_deobfuscate_test.py @@ -17,6 +17,7 @@ LINE_PREFIXES = [ '09-08 14:38:35.535 18029 18084 E qcom_sensors_hal: ', # logcat 'W/GCM (15158): ', + 'W/GCM ( 158): ', ] TEST_MAP = """\