proc: print runtime.curg._panic.arg on unrecovered-panic breakpoint (#833)
You usually want to know the reason for the panic when a panic happens, it can be printed manually this is a small quality of life improvement.
This commit is contained in:
parent
98a4ff7a9f
commit
862145f874
@ -267,6 +267,7 @@ func Connect(addr string, path string, pid int, attempts int) (*Process, error)
|
||||
bp, err := p.SetBreakpoint(panicpc, proc.UserBreakpoint, nil)
|
||||
if err == nil {
|
||||
bp.Name = "unrecovered-panic"
|
||||
bp.Variables = []string{"runtime.curg._panic.arg"}
|
||||
bp.ID = -1
|
||||
p.breakpointIDCounter--
|
||||
}
|
||||
|
||||
@ -418,6 +418,7 @@ func initializeDebugProcess(dbp *Process, path string, attach bool) (*Process, e
|
||||
bp, err := dbp.SetBreakpoint(panicpc, proc.UserBreakpoint, nil)
|
||||
if err == nil {
|
||||
bp.Name = "unrecovered-panic"
|
||||
bp.Variables = []string{"runtime.curg._panic.arg"}
|
||||
bp.ID = -1
|
||||
dbp.breakpointIDCounter--
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user