mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
Implement basic api for figuring out, given a current PC value, where the function will return. Currently the API provides only a way to determine the offset from SP (the Canonical Frame Address). It is left up to the caller to grab the actual address from the traced program.
22 lines
203 B
Go
22 lines
203 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func sleepytime() {
|
|
time.Sleep(time.Millisecond)
|
|
}
|
|
|
|
func helloworld() {
|
|
fmt.Println("Hello, World!")
|
|
}
|
|
|
|
func main() {
|
|
for {
|
|
sleepytime()
|
|
helloworld()
|
|
}
|
|
}
|