(s string)
| 249 | } |
| 250 | |
| 251 | func (this *ContextEvent) GetStackTrace(s string) string { |
| 252 | if this.mconf.RegName != "" { |
| 253 | reg_info := []string{} |
| 254 | for _, reg_name := range strings.Split(this.mconf.RegName, ",") { |
| 255 | reg_value := this.GetRegValue(reg_name) |
| 256 | info, err := util.ParseReg(this.Pid, reg_value) |
| 257 | if err != nil { |
| 258 | fmt.Printf("ParseReg for %s=0x%x failed", reg_name, reg_value) |
| 259 | } else { |
| 260 | reg_info = append(reg_info, fmt.Sprintf("%s(0x%x %s)", reg_name, reg_value, info)) |
| 261 | } |
| 262 | } |
| 263 | s += fmt.Sprintf(", RegsInfo:\n%s", strings.Join(reg_info, "\n")) |
| 264 | } |
| 265 | if this.mconf.ShowRegs { |
| 266 | s += ", Regs:\n" + this.GetRegsString() |
| 267 | } |
| 268 | if this.Stackinfo != "" { |
| 269 | if this.mconf.ShowRegs { |
| 270 | s += fmt.Sprintf("\nBacktrace:\n%s", this.Stackinfo) |
| 271 | } else { |
| 272 | s += fmt.Sprintf(", Backtrace:\n%s", this.Stackinfo) |
| 273 | } |
| 274 | } |
| 275 | return s |
| 276 | } |
| 277 | |
| 278 | func (this *ContextEvent) GetOpt() *UnwindOption { |
| 279 | opt := &UnwindOption{} |
no test coverage detected