Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for findfunc (0.5 sec)

  1. src/runtime/symtab.go

    	return f.datap.textAddr(f.entryOff)
    }
    
    //go:linkname badFuncInfoEntry runtime.funcInfo.entry
    func badFuncInfoEntry(funcInfo) uintptr
    
    // findfunc looks up function metadata for a PC.
    //
    // It is nosplit because it's part of the isgoexception
    // implementation.
    //
    // findfunc should be an internal detail,
    // but widely used packages access it using linkname.
    // Notable members of the hall of shame include:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 40K bytes
    - Viewed (0)
  2. src/runtime/preempt.go

    }
    
    // asyncPreemptStack is the bytes of stack space required to inject an
    // asyncPreempt call.
    var asyncPreemptStack = ^uintptr(0)
    
    func init() {
    	f := findfunc(abi.FuncPCABI0(asyncPreempt))
    	total := funcMaxSPDelta(f)
    	f = findfunc(abi.FuncPCABIInternal(asyncPreempt2))
    	total += funcMaxSPDelta(f)
    	// Add some overhead for return PCs, etc.
    	asyncPreemptStack = uintptr(total) + 8*goarch.PtrSize
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  3. src/runtime/tracestack.go

    				skip--
    			} else if n < len(dst) {
    				dst[n] = retPC
    				n++
    			}
    			return n < len(dst)
    		}
    	)
    
    outer:
    	for _, retPC := range pcBuf[1:] {
    		callPC := retPC - 1
    		fi := findfunc(callPC)
    		if !fi.valid() {
    			// There is no funcInfo if callPC belongs to a C function. In this case
    			// we still keep the pc, but don't attempt to expand inlined frames.
    			if more := skipOrAdd(retPC); !more {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:56 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. src/runtime/panic.go

    	// may try to read a stale LR that looks like a Go code
    	// pointer and wander into the woods.
    	if gp.m.incgo || findfunc(pc).valid() {
    		// This wasn't a bad call, so use PC as sigpanic's
    		// return PC.
    		return true
    	}
    	if findfunc(lr).valid() {
    		// This was a bad call, but the LR is good, so use the
    		// LR as sigpanic's return PC.
    		return false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  5. src/runtime/stack.go

    		// Update syscallsp, syscallpc in case traceback uses them.
    		morebuf := thisg.m.morebuf
    		gp.syscallsp = morebuf.sp
    		gp.syscallpc = morebuf.pc
    		pcname, pcoff := "(unknown)", uintptr(0)
    		f := findfunc(gp.sched.pc)
    		if f.valid() {
    			pcname = funcname(f)
    			pcoff = gp.sched.pc - f.entry()
    		}
    		print("runtime: newstack at ", pcname, "+", hex(pcoff),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  6. src/runtime/race.go

    // function again with that pc.)
    //
    // If the incoming pc is not part of an inlined function, the return pc is unchanged.
    func raceSymbolizeCode(ctx *symbolizeCodeContext) {
    	pc := ctx.pc
    	fi := findfunc(pc)
    	if fi.valid() {
    		u, uf := newInlineUnwinder(fi, pc)
    		for ; uf.valid(); uf = u.next(uf) {
    			sf := u.srcFunc(uf)
    			if sf.funcID == abi.FuncIDWrapper && u.isInlined(uf) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  7. src/runtime/export_test.go

    	for _, r := range a.addrRanges.ranges {
    		result = append(result, AddrRange{r})
    	}
    	return result
    }
    
    // FindSucc returns the successor to base. See addrRanges.findSucc
    // for more details.
    func (a *AddrRanges) FindSucc(base uintptr) int {
    	return a.findSucc(base)
    }
    
    // Add adds a new AddrRange to the AddrRanges.
    //
    // The AddrRange must be mutable (i.e. created by NewAddrRanges),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/test.go

    	}
    }
    
    // function pointer variables
    
    func callBridge(f C.intFunc) int {
    	return int(C.bridge_int_func(f))
    }
    
    func callCBridge(f C.intFunc) C.int {
    	return C.bridge_int_func(f)
    }
    
    func testFpVar(t *testing.T) {
    	const expected = 42
    	f := C.intFunc(C.fortytwo)
    	res1 := C.bridge_int_func(f)
    	if r1 := int(res1); r1 != expected {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  9. src/cmd/cgo/doc.go

    received from Go. For example:
    
    	package main
    
    	// typedef int (*intFunc) ();
    	//
    	// int
    	// bridge_int_func(intFunc f)
    	// {
    	//		return f();
    	// }
    	//
    	// int fortytwo()
    	// {
    	//	    return 42;
    	// }
    	import "C"
    	import "fmt"
    
    	func main() {
    		f := C.intFunc(C.fortytwo)
    		fmt.Println(int(C.bridge_int_func(f)))
    		// Output: 42
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 17:12:16 UTC 2024
    - 42.2K bytes
    - Viewed (0)
Back to top