forked from WinstonPrivacyInc/delve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proc,service,terminal: read defer list
Adds -defer flag to the stack command that decorates the stack traces by associating each stack frame with its deferred calls. Reworks proc.next to use this feature instead of using proc.DeferPC, laying the groundwork to implement go-delve#1240.
- Loading branch information
1 parent
932aad9
commit 8f1fc63
Showing
20 changed files
with
388 additions
and
117 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,32 @@ | ||
package main | ||
|
||
import "runtime" | ||
|
||
func f1() { | ||
} | ||
|
||
func f2() { | ||
} | ||
|
||
func f3() { | ||
} | ||
|
||
func call1() { | ||
defer f2() | ||
defer f1() | ||
call2() | ||
} | ||
|
||
func call2() { | ||
defer f3() | ||
defer f2() | ||
call3() | ||
} | ||
|
||
func call3() { | ||
runtime.Breakpoint() | ||
} | ||
|
||
func main() { | ||
call1() | ||
} |
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
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
Oops, something went wrong.