Index: debugpy-1.3.0/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py =================================================================== --- debugpy-1.3.0.orig/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +++ debugpy-1.3.0/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py @@ -271,27 +271,15 @@ def run_python_code_linux(pid, python_co assert '\'' not in python_code, 'Having a single quote messes with our command.' filedir = os.path.dirname(__file__) - # Valid arguments for arch are i386, i386:x86-64, i386:x64-32, i8086, - # i386:intel, i386:x86-64:intel, i386:x64-32:intel, i386:nacl, - # i386:x86-64:nacl, i386:x64-32:nacl, auto. - - if is_python_64bit(): - suffix = 'amd64' - arch = 'i386:x86-64' - else: - suffix = 'x86' - arch = 'i386' - - print('Attaching with arch: %s' % (arch,)) - - target_dll = os.path.join(filedir, 'attach_linux_%s.so' % suffix) + # must be compiled on the same architecture + target_dll = os.path.join(filedir, 'attach_SUSE.so') target_dll = os.path.abspath(os.path.normpath(target_dll)) + print('Attaching with lib: %s' % target_dll) if not os.path.exists(target_dll): - raise RuntimeError('Could not find dll file to inject: %s' % target_dll) + raise RuntimeError('Could not find library to inject: %s' % target_dll) # Note: we currently don't support debug builds is_debug = 0 - # Note that the space in the beginning of each line in the multi-line is important! cmd = [ 'gdb', '--nw', # no gui interface @@ -306,7 +294,7 @@ def run_python_code_linux(pid, python_co cmd.extend(["--eval-command='set scheduler-locking off'"]) # If on we'll deadlock. - cmd.extend(["--eval-command='set architecture %s'" % arch]) + cmd.extend(["--eval-command='set architecture auto'"]) cmd.extend([ "--eval-command='call (void*)dlopen(\"%s\", 2)'" % target_dll,