diff options
| author | Léo Lam <leo@leolam.fr> | 2021-07-31 12:23:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-31 12:23:40 +0200 |
| commit | 71fc0f35e81402a7c2954bd0ca12352ea2550858 (patch) | |
| tree | 630aa9546bae7ea8e6f377dcf25f1b879c8f3a53 /tools/dump_function.py | |
| parent | ea030c356cf283e5cf0bde58ea08a445504573f4 (diff) | |
| parent | 6e30bbea3274679c34832182dcbeb4ed1211dd16 (diff) | |
Merge pull request #51 from leoetlino/optimized-checker
tools: Add a new, optimized check tool
Diffstat (limited to 'tools/dump_function.py')
| -rwxr-xr-x | tools/dump_function.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/dump_function.py b/tools/dump_function.py deleted file mode 100755 index f95f3b7a..00000000 --- a/tools/dump_function.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python3 - -import argparse - -import util.elf -from util import utils - - -def dump_fn(name: str) -> None: - expected_dir = utils.get_repo_root() / "expected" - try: - fn = util.elf.get_fn_from_my_elf(name) - path = expected_dir / f"{name}.bin" - path.parent.mkdir(exist_ok=True) - path.write_bytes(fn.data) - except KeyError: - utils.fail("could not find function") - - -def main() -> None: - parser = argparse.ArgumentParser() - parser.add_argument("function_name", help="Name of the function to dump") - args = parser.parse_args() - - dump_fn(args.function_name) - - -if __name__ == "__main__": - main() |
