String prints the argument as the name if present, otherwise as the value.
()
| 147 | |
| 148 | // String prints the argument as the name if present, otherwise as the value. |
| 149 | func (a *Arg) String() string { |
| 150 | if a.Name != "" { |
| 151 | return a.Name |
| 152 | } |
| 153 | if a.IsOffsetTooLarge { |
| 154 | return "_" |
| 155 | } |
| 156 | if a.IsAggregate { |
| 157 | return "{" + a.Fields.String() + "}" |
| 158 | } |
| 159 | if a.Value < uint64(len(zeroToNine)) { |
| 160 | return zeroToNine[a.Value : a.Value+1] |
| 161 | } |
| 162 | return fmt.Sprintf("0x%x", a.Value) |
| 163 | } |
| 164 | |
| 165 | const ( |
| 166 | // The pointer floor can be below 1MiB (!) on Windows. |
no outgoing calls