コード例 #1
0
ファイル: plain-formatter.cs プロジェクト: GNOME/mortadelo
        public string Format(int syscall_index, Syscall syscall, SyscallVisibleField field)
        {
            switch (field) {
            case SyscallVisibleField.None:
                return null;

            case SyscallVisibleField.Process:
                return Util.FormatProcess (syscall.pid, syscall.tid, syscall.execname);

            case SyscallVisibleField.Timestamp:
                return Util.FormatTimestamp (syscall.timestamp);

            case SyscallVisibleField.Name:
                return syscall.name;

            case SyscallVisibleField.Arguments:
                return syscall.arguments;

            case SyscallVisibleField.ExtraInfo:
                return syscall.extra_info;

            case SyscallVisibleField.Result:
                return Util.FormatResult (syscall.have_result, syscall.result);

            default:
                Debug.Assert (false, "Not reached");
                return null;
            }
        }
コード例 #2
0
ファイル: log.cs プロジェクト: GNOME/mortadelo
        public int AppendSyscall(Syscall syscall)
        {
            syscall.index = syscalls.Count;
            uniquify_strings (ref syscall);

            syscalls.Add (syscall);
            if (SyscallInserted != null)
                SyscallInserted (syscall.index);

            return syscall.index;
        }
コード例 #3
0
        public void Serialize(TextWriter writer, Syscall syscall)
        {
            if (syscall.name == "open" && syscall.is_syscall_start) {
                writer.Write ("start.open: {0}: {1} ({2}:{3}): {4}\n",
                          syscall.timestamp,
                          syscall.execname,
                          syscall.pid,
                          syscall.tid,
                          syscall.arguments);
            }

            if (syscall.name == "open" && syscall.is_syscall_end) {
                writer.Write ("return.open: {0}: {1} ({2}:{3}): {4}\n",
                          syscall.timestamp,
                          syscall.execname,
                          syscall.pid,
                          syscall.tid,
                          syscall.result);
            }
        }
コード例 #4
0
ファイル: filter-formatter.cs プロジェクト: GNOME/mortadelo
        public string Format(int syscall_index, Syscall syscall, SyscallVisibleField field)
        {
            string text;

            switch (field) {
            case SyscallVisibleField.None:
                return null;

            case SyscallVisibleField.Process:
                text = Util.FormatProcess (syscall.pid, syscall.tid, syscall.execname);
                break;

            case SyscallVisibleField.Timestamp:
                text = Util.FormatTimestamp (syscall.timestamp);
                break;

            case SyscallVisibleField.Name:
                text = syscall.name;
                break;

            case SyscallVisibleField.Arguments:
                text = syscall.arguments;
                break;

            case SyscallVisibleField.ExtraInfo:
                text = syscall.extra_info;
                break;

            case SyscallVisibleField.Result:
                text = Util.FormatResult (syscall.have_result, syscall.result);
                break;

            default:
                Debug.Assert (false, "Not reached");
                return null;
            }

            return highlight_matches (field, syscall_index, text);
        }
コード例 #5
0
ファイル: log.cs プロジェクト: GNOME/mortadelo
        public void ModifySyscall(int num, Syscall syscall)
        {
            syscall.index = num;
            uniquify_strings (ref syscall);

            syscalls[num] = syscall;

            if (SyscallModified != null)
                SyscallModified (num);
        }
コード例 #6
0
ファイル: log.cs プロジェクト: GNOME/mortadelo
 void uniquify_strings(ref Syscall syscall)
 {
     syscall.execname = unique_string (syscall.execname);
     syscall.name = unique_string (syscall.name);
     syscall.arguments = unique_string (syscall.arguments);
     syscall.extra_info = unique_string (syscall.extra_info);
 }