From 2c844f2dd7e92384d3b9e41f7514d36e9f810bff Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Sun, 22 Feb 2015 14:05:17 -0800 Subject: [PATCH] Fix dt a bit --- gef/types.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/gef/types.py b/gef/types.py index 24f857893..0a91cef36 100644 --- a/gef/types.py +++ b/gef/types.py @@ -64,7 +64,7 @@ def load(name): except gdb.error: pass - s, _ = gdb.lookup_symbol + # s, _ = gdb.lookup_symbol(name) # Try to find an architecture-specific include path arch = gef.arch.current.split(':')[0] @@ -88,15 +88,7 @@ def load(name): source += ''' -#ifdef %(name)s -#pragma push("%(name)s") -#undef %(name)s -long long %(name)s = -#pragma pop("%(name)s") -%(name)s; -#else -%(name)s foo; -#endif +{name} foo; '''.format(**locals()) filename = '%s/%s_%s' % (tempdir, arch, name) @@ -106,7 +98,9 @@ long long %(name)s = f.write(source) f.flush() - subprocess.check_output('g++ -w -c -g %s.cc -o %s.o' % (filename, filename), shell=True) + command = 'g++ -w -c -g %s.cc -o %s.o' + command = command % (filename, filename) + subprocess.check_output(command, shell=True) gdb.execute('add-symbol-file %s.o 0' % filename, from_tty=False, to_string=True)