Protections returns page protection mask for every frame comprising the stack.
(pid uint32)
| 404 | // Protections returns page protection mask for every |
| 405 | // frame comprising the stack. |
| 406 | func (s Callstack) Protections(pid uint32) []string { |
| 407 | proc, err := windows.OpenProcess(windows.PROCESS_QUERY_INFORMATION, false, pid) |
| 408 | if err != nil { |
| 409 | return nil |
| 410 | } |
| 411 | defer windows.Close(proc) |
| 412 | prots := make([]string, len(s)) |
| 413 | for i, f := range s { |
| 414 | prots[i] = f.Protection(proc) |
| 415 | } |
| 416 | return prots |
| 417 | } |
| 418 | |
| 419 | // CallsiteInsns returns callsite assembly opcodes |
| 420 | // for leading/trailing bytes contained in each frame. |
no test coverage detected