Home | History | Annotate | Download | only in doc

Lines Matching full:regexp

79 <pre>(gdb) <b>info variables <i>regexp</i></b></pre>
155 <a href="/pkg/regexp/">regexp</a> package's unit tests. To build the binary,
156 change to <code>$GOROOT/src/regexp</code> and run <code>go test -c</code>.
157 This should produce an executable file named <code>regexp.test</code>.
164 Launch GDB, debugging <code>regexp.test</code>:
168 $ <b>gdb regexp.test</b>
175 Reading symbols from /home/user/go/src/regexp/regexp.test...
192 $ <b>gdb regexp.test -d $GOROOT</b>
230 (gdb) <b>l regexp.go:1</b>
239 they belong to. The <code>Compile</code> function from the <code>regexp</code>
240 package is known to GDB as <code>'regexp.Compile'</code>.
245 the <code>*Regexp</code> type?s <code>String</code> method is known as
246 <code>'regexp.(*Regexp).String'</code>.
261 (gdb) <b>b 'regexp.TestFind'</b>
262 Breakpoint 1 at 0x424908: file /home/user/go/src/regexp/find_test.go, line 148.
271 Starting program: /home/user/go/src/regexp/regexp.test
273 Breakpoint 1, regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
300 #0 regexp.TestFind (t=0xf8404a89c0) at /home/user/go/src/regexp/find_test.go:148
323 #5 0x0000000000400dc1 in main.main () at /home/user/go/src/regexp/_testmain.go:98
330 The stack frame shows we?re currently executing the <code>regexp.TestFind</code> function, as expected.
336 rip = 0x425530 in regexp.TestFind (/home/user/go/src/regexp/find_test.go:148);
363 <code>Regexp</code> value. Note that GDB has incorrectly put the <code>*</code>
395 $5 = (struct regexp.Regexp *) 0xf84068d070
399 machine = []*regexp.machine}
401 $7 = {Inst = []regexp/syntax.Inst = {{Op = 5 '\005', Out = 0, Arg = 0, Rune = []int}, {Op =
413 regexp.(*Regexp).String (re=0xf84068d070, noname=void) at /home/user/go/src/regexp/regexp.go:97
414 97 func (re *Regexp) String() string {
423 #0 regexp.(*Regexp).String (re=0xf84068d070, noname=void)
424 at /home/user/go/src/regexp/regexp.go:97
425 #1 0x0000000000425615 in regexp.TestFind (t=0xf840688b60)
426 at /home/user/go/src/regexp/find_test.go:151
444 97 func (re *Regexp) String() string {
454 GDB's pretty printing mechanism is triggered by regexp matches on type names. An example for slices:
495 Interfaces are represented in the runtime as a pointer to a type descriptor and a pointer to a value. The Go GDB runtime extension decodes this and automatically triggers pretty printing for the runtime type. The extension function <code>$dtype</code> decodes the dynamic type for you (examples are taken from a breakpoint at <code>regexp.go</code> line 293.)
502 type = regexp.input
504 $26 = (struct regexp.inputBytes *) 0xf8400b4930
506 regexp.input: struct regexp.inputBytes *