-
Notifications
You must be signed in to change notification settings - Fork 63
Add option to print export information #1123
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
base: main
Are you sure you want to change the base?
Conversation
Add option `-print-export-info` to print interresting information of export functions. For the moment it only prints the alignment of the arguments
@@ -423,8 +423,9 @@ let pp_sprog ~debug pd asmOp fmt ((funcs, p_extra):('info, 'asm) Prog.sprog) = | |||
let pp_opn = pp_opn pd asmOp in | |||
let pp_var = pp_var ~debug in | |||
let pp_f_extra fmt f_extra = | |||
Format.fprintf fmt "(* @[<v>alignment = %s; stack size = %a + %a; max stack size = %a;@ max call depth = %a;@ saved register = @[%a@];@ saved stack = %a;@ return_addr = %a@] *)" | |||
Format.fprintf fmt "(* @[<v>alignment = %s; argument alignment = [%a];@ stack size = %a + %a; max stack size = %a;@ max call depth = %a;@ saved register = @[%a@];@ saved stack = %a;@ return_addr = %a@] *)" |
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.
Wouldn't it be interesting to output data as a standard format (for example json) ?
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.
We have this PR that has been open for long, but we could not find a principled way to implement it.
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've added an option to print the export information in JSON.
This new export prints alignment information for all arguments. Where the previous printer was limited to the relevant information (alignment <> 8) to make it easier to read.
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.
PR look good to me. You need to edit CHANGELOG.md
and add your name to AUTHOR file before we can merge this PR
…for export information
Add option
-print-export-info
to print interesting information of export functions.For the moment it only prints the alignment of the arguments for each exported function.