|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 using System; |
|
18 using System.Text; |
|
19 using System.Text.RegularExpressions; |
|
20 using System.Collections.Generic; |
|
21 |
|
22 namespace DExcPlugin.ExpressionManager |
|
23 { |
|
24 internal static class DExcExpressionManager |
|
25 { |
|
26 // For start of log |
|
27 public static readonly Regex LogStart = new Regex( "(?:.*)EKA2 USER CRASH LOG(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
28 |
|
29 // For thread |
|
30 public static readonly Regex ThreadName = new Regex( "(?:.*)Thread Name: (.+)(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
31 public static readonly Regex ThreadId = new Regex( "(?:.*)Thread ID: ([0-9]{1,5})(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
32 public static readonly Regex ThreadStackRange = new Regex( "(?:.*)User Stack(?:\\:|) ([a-fA-F0-9]{8})\\-([a-fA-F0-9]{8})(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
33 public static readonly Regex ThreadPanicDetails = new Regex( "(?:.*)Panic: (.*)-(\\d+)(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
34 |
|
35 // For stack |
|
36 public static readonly Regex StackDataEntry = new Regex( "(?:.*)\r\n([a-fA-F0-9]{8})\r\n\r\n\\:\\s{1}\r\n\r\n((?:[a-fA-F0-9]{2})\\s{1}){1,16}\r\n(?:.*)", RegexOptions.CultureInvariant | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled ); |
|
37 |
|
38 // For registers (exception) |
|
39 public static readonly Regex RegistersExceptionStart = new Regex( "(?:.*)UNHANDLED EXCEPTION(?:\\:|)(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
40 public static readonly Regex RegistersExceptionSet1 = new Regex( "(?:.*)code=(\\d*) PC=([a-fA-F0-9]{8}) FAR=([a-fA-F0-9]{8}) FSR=([a-fA-F0-9]{8})(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
41 public static readonly Regex RegistersExceptionSet2 = new Regex( "(?:.*)R13svc=([a-fA-F0-9]{8}) R14svc=([a-fA-F0-9]{8}) SPSRsvc=([a-fA-F0-9]{8})(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
42 |
|
43 // For registers (user) |
|
44 public static readonly Regex RegistersUserStart = new Regex( "(?:.*)USER REGISTERS(?:\\:|)(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
45 public static readonly Regex RegistersUserCPSR = new Regex( "(?:.*)CPSR=([a-fA-F0-9]{8})(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
46 public static readonly Regex RegistersUserSet = new Regex( "(?:.*)r(\\d{2})=([a-fA-F0-9]{8}) ([a-fA-F0-9]{8}) ([a-fA-F0-9]{8}) ([a-fA-F0-9]{8})(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
47 |
|
48 // For code segments |
|
49 public static readonly Regex CodeSegmentsStart = new Regex( "(?:.*)CODE SEGMENTS(?:\\:|)(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
50 public static readonly Regex CodeSegmentsEntry = new Regex( "(?:.*)([a-fA-F0-9]{8})\\-([a-fA-F0-9]{8}) (.+)(?:.*)", RegexOptions.CultureInvariant | RegexOptions.Compiled ); |
|
51 } |
|
52 } |