Skip to content
Snippets Groups Projects
Commit 4df4deef authored by aticu's avatar aticu
Browse files

Use popen instead of run in python script

parent e4bf8be8
Branches
No related tags found
No related merge requests found
......@@ -19,10 +19,10 @@ assembler = path + "/" + arch_prefix + "as"
objdump = path + "/" + arch_prefix + "objdump"
subprocess.run([assembler, sys.argv[1], "-march=" + march])
objdump_result = subprocess.run([objdump, "-D", "a.out"], capture_output=True)
with subprocess.Popen([objdump, "-D", "a.out"], stdout=subprocess.PIPE) as objdump_result:
text_start = False
for line in objdump_result.stdout.decode("utf-8").splitlines():
for line in objdump_result.stdout.read().decode("utf-8").splitlines():
if not text_start:
if line == "00000000 <.text>:":
text_start = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment