-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proc: some refactorings for supporting struct literals #3909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM just needs some doc comments.
@@ -43,3 +45,9 @@ func Or(x, y ast.Expr) ast.Expr { | |||
} | |||
return &ast.BinaryExpr{Op: token.LOR, X: x, Y: y} | |||
} | |||
|
|||
func ExprToString(t ast.Expr) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a doc comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -1101,3 +1101,16 @@ func zeroArray(t Type) { | |||
t = at.Type | |||
} | |||
} | |||
|
|||
func ResolveTypedef(typ Type) Type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a doc comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
* deduplicates exprToString, defined in multiple packages, and moves it to astutil * moves resolveTypedef into pkg/dwarf/godwarf, this is currently only used by pkg/proc but we will need to call it from pkg/proc/evalop * creates a new FakePointerType function in pkg/dwarf/godwarf, this is also a function that is only used by pkg/proc but pkg/proc/evalop will also need. Updates go-delve#1465
7a3cc07
to
c1124be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
to astutil
used by pkg/proc but we will need to call it from pkg/proc/evalop
also a function that is only used by pkg/proc but pkg/proc/evalop will
also need.
Updates #1465