()
| 126 | } |
| 127 | |
| 128 | func (this *SyscallEvent) String() string { |
| 129 | this.Stack_str = "" |
| 130 | if this.EventId == SYSCALL_ENTER { |
| 131 | this.Stack_str = this.GetStackTrace(this.Stack_str) |
| 132 | } |
| 133 | if this.mconf.FmtJson { |
| 134 | data, err := json.Marshal(this) |
| 135 | if err != nil { |
| 136 | panic(err) |
| 137 | } |
| 138 | return string(data) |
| 139 | } |
| 140 | var base_str string |
| 141 | base_str = fmt.Sprintf("[%s] %s%s", this.GetUUID(), this.nr_point.Name, this.PointStr) |
| 142 | if this.EventId == SYSCALL_ENTER { |
| 143 | var lr_str string |
| 144 | var pc_str string |
| 145 | if this.mconf.GetOff { |
| 146 | lr_str = fmt.Sprintf("LR:0x%x(%s)", this.LR, this.GetOffset(this.LR)) |
| 147 | pc_str = fmt.Sprintf("PC:0x%x(%s)", this.PC, this.GetOffset(this.PC)) |
| 148 | } else { |
| 149 | lr_str = fmt.Sprintf("LR:0x%x", this.LR) |
| 150 | pc_str = fmt.Sprintf("PC:0x%x", this.PC) |
| 151 | } |
| 152 | base_str = fmt.Sprintf("%s %s %s SP:0x%x", base_str, lr_str, pc_str, this.SP) |
| 153 | } |
| 154 | return base_str + this.Stack_str |
| 155 | } |
| 156 | |
| 157 | func (this *SyscallEvent) Clone() IEventStruct { |
| 158 | event := new(SyscallEvent) |
nothing calls this directly
no test coverage detected