forked from go-delve/delve
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proc: allow access to thread registers after a function call
After a call injection sequence terminates allow the evaluator to access thread registers again so that variables stored in registers can be used as arguments. Fixes go-delve#3310
- Loading branch information
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"reflect" | ||
) | ||
|
||
var i = 2 | ||
var val = reflect.ValueOf(i) | ||
|
||
func reflectFunc(value reflect.Value) { | ||
fmt.Printf("%s\n", value.Type().Name()) | ||
} | ||
|
||
func main() { | ||
reflectFunc(val) | ||
fmt.Println(&i) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters