typeinfo: skip failed compile attempts (#470)

* typeinfo: skip failed compile attempts

This fixes the problem that single header files that are not compilable
do not abort the compilation loop.
Errors about the failure are printed anyway be check_output we just
avoid abortion.

* Remove shell=True in subprocess.check_output
pull/471/head
Levente Polyak 8 years ago committed by Disconnect3d
parent dfa089d3a7
commit cefed15263

@ -153,7 +153,10 @@ def compile(filename=None, address=0):
if not os.path.exists(objectname):
gcc = pwndbg.gcc.which()
gcc += ['-w', '-c', '-g', filename, '-o', objectname]
subprocess.check_output(' '.join(gcc), shell=True)
try:
subprocess.check_output(gcc)
except subprocess.CalledProcessError as e:
return
add_symbol_file(objectname, address)

Loading…
Cancel
Save