-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathdebug_gosym.htm
489 lines (256 loc) · 27.5 KB
/
debug_gosym.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
<!DOCTYPE html>
<html lang="en">
<head profile="http://a9.com/-/spec/opensearch/1.1/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../assets/site.css" rel="stylesheet">
<title>debug/gosym</title>
<meta name="twitter:title" content="Package gosym">
<meta property="og:title" content="Package gosym">
<meta name="description" content="Package gosym implements access to the Go symbol and line number tables embedded in Go binaries generated by the gc compilers.">
<meta name="twitter:description" content="Package gosym implements access to the Go symbol and line number tables embedded in Go binaries generated by the gc compilers.">
<meta property="og:description" content="Package gosym implements access to the Go symbol and line number tables embedded in Go binaries generated by the gc compilers.">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@golang">
</head>
<body>
<div class="container">
<h2 id="pkg-overview">package gosym</h2>
<p><code>import "debug/gosym"</code>
<p>
Package gosym implements access to the Go symbol
and line number tables embedded in Go binaries generated
by the gc compilers.</p>
<h3 id="pkg-index" class="section-header">Index <a class="permalink" href="#pkg-index">¶</a></h3>
<ul class="list-unstyled">
<li><a href="#DecodingError">type DecodingError</a></li>
<ul>
<li><a href="#DecodingError.Error">func (e *DecodingError) Error() string</a></li>
</ul>
<li><a href="#Func">type Func</a></li>
<li><a href="#LineTable">type LineTable</a></li>
<ul>
<li><a href="#NewLineTable">func NewLineTable(data []byte, text uint64) *LineTable</a></li>
<li><a href="#LineTable.LineToPC">func (t *LineTable) LineToPC(line int, maxpc uint64) uint64</a></li><li><a href="#LineTable.PCToLine">func (t *LineTable) PCToLine(pc uint64) int</a></li>
</ul>
<li><a href="#Obj">type Obj</a></li>
<li><a href="#Sym">type Sym</a></li>
<ul>
<li><a href="#Sym.BaseName">func (s *Sym) BaseName() string</a></li><li><a href="#Sym.PackageName">func (s *Sym) PackageName() string</a></li><li><a href="#Sym.ReceiverName">func (s *Sym) ReceiverName() string</a></li><li><a href="#Sym.Static">func (s *Sym) Static() bool</a></li>
</ul>
<li><a href="#Table">type Table</a></li>
<ul>
<li><a href="#NewTable">func NewTable(symtab []byte, pcln *LineTable) (*Table, error)</a></li>
<li><a href="#Table.LineToPC">func (t *Table) LineToPC(file string, line int) (pc uint64, fn *Func, err error)</a></li><li><a href="#Table.LookupFunc">func (t *Table) LookupFunc(name string) *Func</a></li><li><a href="#Table.LookupSym">func (t *Table) LookupSym(name string) *Sym</a></li><li><a href="#Table.PCToFunc">func (t *Table) PCToFunc(pc uint64) *Func</a></li><li><a href="#Table.PCToLine">func (t *Table) PCToLine(pc uint64) (file string, line int, fn *Func)</a></li><li><a href="#Table.SymByAddr">func (t *Table) SymByAddr(addr uint64) *Sym</a></li>
</ul>
<li><a href="#UnknownFileError">type UnknownFileError</a></li>
<ul>
<li><a href="#UnknownFileError.Error">func (e UnknownFileError) Error() string</a></li>
</ul>
<li><a href="#UnknownLineError">type UnknownLineError</a></li>
<ul>
<li><a href="#UnknownLineError.Error">func (e *UnknownLineError) Error() string</a></li>
</ul>
</ul>
<span id="pkg-examples"></span>
<h4 id="pkg-files">
<a href="https://github.com/golang/go/blob/master/src/debug/gosym/">Package Files</a>
<a class="permalink" href="#pkg-files">¶</a>
</h4>
<p><a href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go">pclntab.go</a> <a href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go">symtab.go</a> </p>
<h3 id="DecodingError" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L706">DecodingError</a> <a class="permalink" href="#DecodingError">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=DecodingError&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L706">❖</a><pre>type DecodingError struct {
<span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
DecodingError represents an error during the decoding of
the symbol table.
</p>
<h4 id="DecodingError.Error" data-kind="m">func (*DecodingError) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L712">Error</a> <a class="permalink" href="#DecodingError.Error">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=DecodingError%2FError&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L712">❖</a><pre>func (e *<a href="#DecodingError">DecodingError</a>) Error() <a href="/builtin#string">string</a></pre></div>
<h3 id="Func" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L78">Func</a> <a class="permalink" href="#Func">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Func&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L78">❖</a><pre>type Func struct {
<span id="Func.Entry">Entry</span> <a href="/builtin#uint64">uint64</a>
*<a href="#Sym">Sym</a>
<span id="Func.End">End</span> <a href="/builtin#uint64">uint64</a>
<span id="Func.Params">Params</span> []*<a href="#Sym">Sym</a>
<span id="Func.Locals">Locals</span> []*<a href="#Sym">Sym</a>
<span id="Func.FrameSize">FrameSize</span> <a href="/builtin#int">int</a>
<span id="Func.LineTable">LineTable</span> *<a href="#LineTable">LineTable</a>
<span id="Func.Obj">Obj</span> *<a href="#Obj">Obj</a>
}</pre></div><p>
A Func collects information about a single function.
</p>
<h3 id="LineTable" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L29">LineTable</a> <a class="permalink" href="#LineTable">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=LineTable&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L29">❖</a><pre>type LineTable struct {
<span id="LineTable.Data">Data</span> []<a href="/builtin#byte">byte</a>
<span id="LineTable.PC">PC</span> <a href="/builtin#uint64">uint64</a>
<span id="LineTable.Line">Line</span> <a href="/builtin#int">int</a>
<span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A LineTable is a data structure mapping program counters to line numbers.
</p>
<p>
In Go 1.1 and earlier, each function (represented by a Func) had its own LineTable,
and the line number corresponded to a numbering of all source lines in the
program, across all files. That absolute line number would then have to be
converted separately to a file name and line number within the file.
</p>
<p>
In Go 1.2, the format of the data changed so that there is a single LineTable
for the entire program, shared by all Funcs, and there are no absolute line
numbers, just line numbers within specific files.
</p>
<p>
For the most part, LineTable's methods should be treated as an internal
detail of the package; callers should use the methods on Table instead.
</p>
<h4 id="NewLineTable" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L122">NewLineTable</a> <a class="permalink" href="#NewLineTable">¶</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewLineTable&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L122">❖</a><pre>func NewLineTable(data []<a href="/builtin#byte">byte</a>, text <a href="/builtin#uint64">uint64</a>) *<a href="#LineTable">LineTable</a></pre></div><p>
NewLineTable returns a new PC/line table
corresponding to the encoded data.
Text must be the start address of the
corresponding text segment.
</p>
<h4 id="LineTable.LineToPC" data-kind="m">func (*LineTable) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L106">LineToPC</a> <a class="permalink" href="#LineTable.LineToPC">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=LineTable%2FLineToPC&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L106">❖</a><pre>func (t *<a href="#LineTable">LineTable</a>) LineToPC(line <a href="/builtin#int">int</a>, maxpc <a href="/builtin#uint64">uint64</a>) <a href="/builtin#uint64">uint64</a></pre></div><p>
LineToPC returns the program counter for the given line number,
considering only program counters before maxpc.
Callers should use Table's LineToPC method instead.
</p>
<h4 id="LineTable.PCToLine" data-kind="m">func (*LineTable) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L95">PCToLine</a> <a class="permalink" href="#LineTable.PCToLine">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=LineTable%2FPCToLine&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/pclntab.go#L95">❖</a><pre>func (t *<a href="#LineTable">LineTable</a>) PCToLine(pc <a href="/builtin#uint64">uint64</a>) <a href="/builtin#int">int</a></pre></div><p>
PCToLine returns the line number for the given program counter.
Callers should use Table's PCToLine method instead.
</p>
<h3 id="Obj" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L100">Obj</a> <a class="permalink" href="#Obj">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Obj&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L100">❖</a><pre>type Obj struct {
<span class="com">// Funcs is a list of functions in the Obj.</span>
<span id="Obj.Funcs">Funcs</span> []<a href="#Func">Func</a>
<span class="com">// In Go 1.1 and earlier, Paths is a list of symbols corresponding
// to the source file names that produced the Obj.
// In Go 1.2, Paths is nil.
// Use the keys of Table.Files to obtain a list of source files.</span>
<span id="Obj.Paths">Paths</span> []<a href="#Sym">Sym</a> <span class="com">// meta</span>
}</pre></div><p>
An Obj represents a collection of functions in a symbol table.
</p>
<p>
The exact method of division of a binary into separate Objs is an internal detail
of the symbol table format.
</p>
<p>
In early versions of Go each source file became a different Obj.
</p>
<p>
In Go 1 and Go 1.1, each package produced one Obj for all Go sources
and one Obj per C source file.
</p>
<p>
In Go 1.2, there is a single Obj for the entire program.
</p>
<h3 id="Sym" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L28">Sym</a> <a class="permalink" href="#Sym">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Sym&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L28">❖</a><pre>type Sym struct {
<span id="Sym.Value">Value</span> <a href="/builtin#uint64">uint64</a>
<span id="Sym.Type">Type</span> <a href="/builtin#byte">byte</a>
<span id="Sym.Name">Name</span> <a href="/builtin#string">string</a>
<span id="Sym.GoType">GoType</span> <a href="/builtin#uint64">uint64</a>
<span class="com">// If this symbol is a function symbol, the corresponding Func</span>
<span id="Sym.Func">Func</span> *<a href="#Func">Func</a>
}</pre></div><p>
A Sym represents a single symbol table entry.
</p>
<h4 id="Sym.BaseName" data-kind="m">func (*Sym) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L70">BaseName</a> <a class="permalink" href="#Sym.BaseName">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Sym%2FBaseName&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L70">❖</a><pre>func (s *<a href="#Sym">Sym</a>) BaseName() <a href="/builtin#string">string</a></pre></div><p>
BaseName returns the symbol name without the package or receiver name.
</p>
<h4 id="Sym.PackageName" data-kind="m">func (*Sym) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L42">PackageName</a> <a class="permalink" href="#Sym.PackageName">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Sym%2FPackageName&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L42">❖</a><pre>func (s *<a href="#Sym">Sym</a>) PackageName() <a href="/builtin#string">string</a></pre></div><p>
PackageName returns the package part of the symbol name,
or the empty string if there is none.
</p>
<h4 id="Sym.ReceiverName" data-kind="m">func (*Sym) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L56">ReceiverName</a> <a class="permalink" href="#Sym.ReceiverName">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Sym%2FReceiverName&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L56">❖</a><pre>func (s *<a href="#Sym">Sym</a>) ReceiverName() <a href="/builtin#string">string</a></pre></div><p>
ReceiverName returns the receiver type name of this symbol,
or the empty string if there is none.
</p>
<h4 id="Sym.Static" data-kind="m">func (*Sym) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L38">Static</a> <a class="permalink" href="#Sym.Static">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Sym%2FStatic&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L38">❖</a><pre>func (s *<a href="#Sym">Sym</a>) Static() <a href="/builtin#bool">bool</a></pre></div><p>
Static reports whether this symbol is static (not visible outside its file).
</p>
<h3 id="Table" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L118">Table</a> <a class="permalink" href="#Table">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Table&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L118">❖</a><pre>type Table struct {
<span id="Table.Syms">Syms</span> []<a href="#Sym">Sym</a>
<span id="Table.Funcs">Funcs</span> []<a href="#Func">Func</a>
<span id="Table.Files">Files</span> map[<a href="/builtin#string">string</a>]*<a href="#Obj">Obj</a> <span class="com">// nil for Go 1.2 and later binaries</span>
<span id="Table.Objs">Objs</span> []<a href="#Obj">Obj</a> <span class="com">// nil for Go 1.2 and later binaries
// contains filtered or unexported fields</span>
}</pre></div><p>
Table represents a Go symbol table. It stores all of the
symbols decoded from the program and provides methods to translate
between symbols, names, and addresses.
</p>
<h4 id="NewTable" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L282">NewTable</a> <a class="permalink" href="#NewTable">¶</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewTable&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L282">❖</a><pre>func NewTable(symtab []<a href="/builtin#byte">byte</a>, pcln *<a href="#LineTable">LineTable</a>) (*<a href="#Table">Table</a>, <a href="/builtin#error">error</a>)</pre></div><p>
NewTable decodes the Go symbol table in data,
returning an in-memory representation.
</p>
<h4 id="Table.LineToPC" data-kind="m">func (*Table) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L517">LineToPC</a> <a class="permalink" href="#Table.LineToPC">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Table%2FLineToPC&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L517">❖</a><pre>func (t *<a href="#Table">Table</a>) LineToPC(file <a href="/builtin#string">string</a>, line <a href="/builtin#int">int</a>) (pc <a href="/builtin#uint64">uint64</a>, fn *<a href="#Func">Func</a>, err <a href="/builtin#error">error</a>)</pre></div><p>
LineToPC looks up the first program counter on the given line in
the named file. It returns UnknownPathError or UnknownLineError if
there is an error looking up this line.
</p>
<h4 id="Table.LookupFunc" data-kind="m">func (*Table) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L563">LookupFunc</a> <a class="permalink" href="#Table.LookupFunc">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Table%2FLookupFunc&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L563">❖</a><pre>func (t *<a href="#Table">Table</a>) LookupFunc(name <a href="/builtin#string">string</a>) *<a href="#Func">Func</a></pre></div><p>
LookupFunc returns the text, data, or bss symbol with the given name,
or nil if no such symbol is found.
</p>
<h4 id="Table.LookupSym" data-kind="m">func (*Table) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L547">LookupSym</a> <a class="permalink" href="#Table.LookupSym">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Table%2FLookupSym&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L547">❖</a><pre>func (t *<a href="#Table">Table</a>) LookupSym(name <a href="/builtin#string">string</a>) *<a href="#Sym">Sym</a></pre></div><p>
LookupSym returns the text, data, or bss symbol with the given name,
or nil if no such symbol is found.
</p>
<h4 id="Table.PCToFunc" data-kind="m">func (*Table) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L482">PCToFunc</a> <a class="permalink" href="#Table.PCToFunc">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Table%2FPCToFunc&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L482">❖</a><pre>func (t *<a href="#Table">Table</a>) PCToFunc(pc <a href="/builtin#uint64">uint64</a>) *<a href="#Func">Func</a></pre></div><p>
PCToFunc returns the function containing the program counter pc,
or nil if there is no such function.
</p>
<h4 id="Table.PCToLine" data-kind="m">func (*Table) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L501">PCToLine</a> <a class="permalink" href="#Table.PCToLine">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Table%2FPCToLine&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L501">❖</a><pre>func (t *<a href="#Table">Table</a>) PCToLine(pc <a href="/builtin#uint64">uint64</a>) (file <a href="/builtin#string">string</a>, line <a href="/builtin#int">int</a>, fn *<a href="#Func">Func</a>)</pre></div><p>
PCToLine looks up line number information for a program counter.
If there is no information, it returns fn == nil.
</p>
<h4 id="Table.SymByAddr" data-kind="m">func (*Table) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L574">SymByAddr</a> <a class="permalink" href="#Table.SymByAddr">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Table%2FSymByAddr&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L574">❖</a><pre>func (t *<a href="#Table">Table</a>) SymByAddr(addr <a href="/builtin#uint64">uint64</a>) *<a href="#Sym">Sym</a></pre></div><p>
SymByAddr returns the text, data, or bss symbol starting at the given address.
</p>
<h3 id="UnknownFileError" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L688">UnknownFileError</a> <a class="permalink" href="#UnknownFileError">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=UnknownFileError&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L688">❖</a><pre>type UnknownFileError <a href="/builtin#string">string</a></pre></div><p>
UnknownFileError represents a failure to find the specific file in
the symbol table.
</p>
<h4 id="UnknownFileError.Error" data-kind="m">func (UnknownFileError) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L690">Error</a> <a class="permalink" href="#UnknownFileError.Error">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=UnknownFileError%2FError&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L690">❖</a><pre>func (e <a href="#UnknownFileError">UnknownFileError</a>) Error() <a href="/builtin#string">string</a></pre></div>
<h3 id="UnknownLineError" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L695">UnknownLineError</a> <a class="permalink" href="#UnknownLineError">¶</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=UnknownLineError&pkg=debug%2Fgosym&repo=">Uses</a></h3>
<div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L695">❖</a><pre>type UnknownLineError struct {
<span id="UnknownLineError.File">File</span> <a href="/builtin#string">string</a>
<span id="UnknownLineError.Line">Line</span> <a href="/builtin#int">int</a>
}</pre></div><p>
UnknownLineError represents a failure to map a line to a program
counter, either because the line is beyond the bounds of the file
or because there is no code on the given line.
</p>
<h4 id="UnknownLineError.Error" data-kind="m">func (*UnknownLineError) <a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L700">Error</a> <a class="permalink" href="#UnknownLineError.Error">¶</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=UnknownLineError%2FError&pkg=debug%2Fgosym&repo=">Uses</a></h4>
<div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/debug/gosym/symtab.go#L700">❖</a><pre>func (e *<a href="#UnknownLineError">UnknownLineError</a>) Error() <a href="/builtin#string">string</a></pre></div>
<div id="x-footer" class="clearfix">
<div class="container">
<a href="http://studygolang.com/" target="_blank">Go语言中文网</a>
<span class="text-muted">|</span> <a href="http://golang.org/" target="_blank">Go Language</a>
<span class="pull-right"><a href="#">Back to top</a></span>
</div>
</div>
<script src="../assets/jquery-2.0.3.min.js"></script>
<script src="../assets/bootstrap.min.js"></script>
<script src="../assets/site.js"></script>
</body>
</html>