-
Notifications
You must be signed in to change notification settings - Fork 67
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
Optionally skip printing the function sections #60
Optionally skip printing the function sections #60
Conversation
Add a new -no-functions command line flag to skip printing the UserFunctions and StdFunctions detailed sections. This is useful to get a quick summary of what is in a Go binary. The default is to always print the function sections. Reference: mandiant#49 Signed-off-by: Philippe Ombredanne <[email protected]>
main.go
Outdated
} | ||
|
||
func main_impl(fileName string, printStdPkgs bool, printFilePaths bool, printTypes bool, manualTypeAddress int, versionOverride string) (metadata ExtractMetadata, err error) { | ||
func main_impl(fileName string, printStdPkgs bool, printFilePaths bool, printTypes bool, manualTypeAddress int, versionOverride string, noPrintFunctions bool) (metadata ExtractMetadata, err error) { |
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.
Lets move noPrintFunctions arg to right after printTypes for consistency with the order of where the rest of the output related args are.
main.go
Outdated
@@ -425,6 +427,7 @@ func main() { | |||
typeAddress := flag.Int("m", 0, "Manually parse the RTYPE at the provided virtual address, disables automated enumeration of moduledata typelinks itablinks") | |||
versionOverride := flag.String("v", "", "Override the automated version detection, ex: 1.17. If this is wrong, parsing may fail or produce nonsense") | |||
humanView := flag.Bool("human", false, "Human view, print information flat rather than json, some information is omitted for clarity") | |||
noPrintFunctions := flag.Bool("no-functions", false, "Do not print user and standard function sections") |
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.
I don't like the dash here in the arg name. Lets choose something that's a single word, nofuncs
works nice and is short.
Thanks for the PR, two small adjustments and I'll merge! |
Use -nofuncs command line flag instead. Reorder main_impl() function arguments. Reference: mandiant#49 Signed-off-by: Philippe Ombredanne <[email protected]>
Add a new
-no-functions
command line flag to skip printing theUserFunctions
andStdFunctions
detailed sections.This is useful to get a quick summary of what is in a Go binary.
The default is to always print the function sections.
Reference: #49
Signed-off-by: Philippe Ombredanne [email protected]