Example #1
0
		// Extended low level break information
		public static void  appendBreakInfo(DebugCLI cli, System.Text.StringBuilder sb, bool includeFault)
		{
			Session session = cli.Session;
			FileInfoCache fileInfo = cli.FileCache;
			
			int reason = session.suspendReason();
			int offset = ((PlayerSession) session).SuspendOffset;
			int index = ((PlayerSession) session).SuspendActionIndex;
			
			SwfInfo info = null;
			try
			{
				info = fileInfo.Swfs[index];
			}
			catch (IndexOutOfRangeException)
			{
			}
			if (info != null)
			{
				System.Collections.IDictionary args = new System.Collections.Hashtable();
				args["swfName"] = FileInfoCache.nameOfSwf(info); //$NON-NLS-1$
				sb.Append(LocalizationManager.getLocalizedTextString("key35", args)); //$NON-NLS-1$
				sb.Append(' ');
			}
			
			System.Collections.IDictionary args2 = new System.Collections.Hashtable();
            System.Text.StringBuilder sb2 = new System.Text.StringBuilder();
			args2["address"] = "0x" + FieldFormat.formatLongToHex(sb2, offset, 8) + " (" + offset + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
			sb.Append(LocalizationManager.getLocalizedTextString("atAddress", args2)); //$NON-NLS-1$
			
			if (includeFault)
			{
				args2 = new System.Collections.Hashtable();
				System.Text.StringBuilder reasonBuffer = new System.Text.StringBuilder();
				cli.appendReason(reasonBuffer, reason);
				args2["fault"] = reasonBuffer.ToString(); //$NON-NLS-1$
				sb.Append(' ');
				sb.Append(LocalizationManager.getLocalizedTextString("haltedDueToFault", args2)); //$NON-NLS-1$
			}
		}