diff options
author | bloodstalker <thabogre@gmail.com> | 2018-05-25 23:45:50 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-05-25 23:45:50 +0000 |
commit | a2afe6ff184bc20993f58388887a2d4f1454c140 (patch) | |
tree | 98c3928c40cd268bfbaeb78abbcce50914ef9ea2 /bfd | |
parent | wip:added a wasm backend. i need to setup an interface with the main c++ code... (diff) | |
download | mutator-a2afe6ff184bc20993f58388887a2d4f1454c140.tar.gz mutator-a2afe6ff184bc20993f58388887a2d4f1454c140.zip |
load.py is now imported bt another python module, should cut down on startup time. added the WASM linking structures to dwasm. i can start working on the linker as soon as i get some tests.
Diffstat (limited to 'bfd')
-rwxr-xr-x | bfd/delf.py | 27 | ||||
-rwxr-xr-x | bfd/load.py | 5 |
2 files changed, 31 insertions, 1 deletions
diff --git a/bfd/delf.py b/bfd/delf.py new file mode 100755 index 0000000..60b2697 --- /dev/null +++ b/bfd/delf.py @@ -0,0 +1,27 @@ +#!/usr/bin/python3 + +import argparse +import code +import readline +import signal +import sys +from load import premain, CLIArgParser, SigHandler_SIGINT + +def main(): + argparser = CLIArgParser() + if argparser.args.dbg: + try: + premain(argparser) + except Exception as e: + print(e.__doc__) + if e.message: print(e.message) + signal.signal(signal.SIGINT, SigHandler_SIGINT) + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DELF REPL") + else: + premain(argparser) + +if __name__ == "__main__": + main() diff --git a/bfd/load.py b/bfd/load.py index ae0771f..73ff05e 100755 --- a/bfd/load.py +++ b/bfd/load.py @@ -16,6 +16,7 @@ #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*/ +#**********************************************************************************************************************/ import argparse import sys import readline @@ -1451,7 +1452,9 @@ def main(): if argparser.args.dbg: try: premain(argparser) - except: + except Exception as e: + print(e.__doc__) + if e.message: print(e.message) signal.signal(signal.SIGINT, SigHandler_SIGINT) variables = globals().copy() variables.update(locals()) |