PointerToString returns a string representation of the pointer.
(p Pointer)
| 121 | |
| 122 | // PointerToString returns a string representation of the pointer. |
| 123 | func PointerToString(p Pointer) string { |
| 124 | addr := p.Address() |
| 125 | if addr < lowMem { |
| 126 | return fmt.Sprint(addr) |
| 127 | } |
| 128 | if addr < bits32 { |
| 129 | return fmt.Sprintf("0x%.8x", addr) |
| 130 | } |
| 131 | return fmt.Sprintf("0x%.16x", addr) |
| 132 | } |