Skip to content
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

Pzucker/gdb #70

Merged
merged 63 commits into from
Sep 27, 2019
Merged

Pzucker/gdb #70

merged 63 commits into from
Sep 27, 2019

Conversation

philzook58
Copy link
Contributor

Added functionality and gdb-filename argument to output a gdb file that will breakpoint at the examined function and fill registers with the counter model.
Added documentation in wp-readme

No test as of yet. Not exactly sure how to unit test this.

@@ -0,0 +1,133 @@
(***************************************************************************)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not crazy about the name for this module. Maybe "output.ml"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even "output_gdb.ml", I'm not actually sure how good an idea it is to reuse this module for other things.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did also move the print_result function over into here. If I'm going to name it output_gdb.ml I should move that back. output.ml is perfectly acceptable

List.map ~f:strip_final_digits


(** [output_gdb] is similar to [print_result] except chews on the model and outputs a gdb script with a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should probably be right before output_gdb.

val print_result : Z3.Solver.solver -> Z3.Solver.status -> Constr.t -> Z3.context -> unit


(** Prints to file a gdb script that will fill the appropriate registers with the countermodel *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be more detailed! E.g. the BAP mlis have whole paragraphs explaining the input-output of their functions. We don't need to be quite as detailed, but still. Also: why have a Z3.context when there's one in the Env.t. Are they the same one? What is that first string argument?

wp/plugin/wp.ml Outdated Show resolved Hide resolved
wp/plugin/README.md Outdated Show resolved Hide resolved

type sign = Unsigned | Signed

let string_of_sign s =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you annotate the types for the inputs and output for the functions in this module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should trash a lot of these anyway. They aren't used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My statement was false. They are used.

@codyroux
Copy link
Contributor

Oops, looks like this needs a rebase as well to fix merge conflicts.

@philzook58
Copy link
Contributor Author

Why does it need a rebase?

@codyroux codyroux merged commit 4539d0a into master Sep 27, 2019
@codyroux codyroux deleted the pzucker/gdb branch September 27, 2019 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants