python-cysignals/python-cysignals-gdb.patch

26 lines
1.0 KiB
Diff

diff -up src/scripts/cysignals-CSI.orig src/scripts/cysignals-CSI
--- src/scripts/cysignals-CSI.orig 2017-11-08 05:44:49.702843050 -0500
+++ src/scripts/cysignals-CSI 2017-11-08 05:46:00.580845764 -0500
@@ -69,6 +69,7 @@ def gdb_commands(pid, color):
cmds = b('')
cmds += b('set prompt (cysignals-gdb-prompt)\n')
cmds += b('set verbose off\n')
+ cmds += b('set auto-load safe-path /\n')
cmds += b('attach {0}\n'.format(pid))
cmds += b('python\n')
cmds += b('print("\\n")\n')
@@ -100,13 +101,6 @@ def run_gdb(pid, color):
# Preload the right Python library
libpython = os.path.join(sysconfig.get_config_var('LIBDIR'),
sysconfig.get_config_var('INSTSONAME'))
- if sys.platform == 'macosx':
- env['DYLD_INSERT_LIBRARIES'] = libpython
- else:
- env['LD_PRELOAD'] = libpython
-
- # Set the correct Python path
- env['PYTHONPATH'] = os.path.dirname(site.__file__)
whichgdb = find_executable('gdb')
if whichgdb is None: