Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def verify_gdb_exists(gdb_path):
if find_executable(gdb_path) is None:
pygdbmi.printcolor.print_red(
'gdb executable "%s" was not found. Verify the executable exists, or that it is a directory on your $PATH environment variable.'
% gdb_path
)
if USING_WINDOWS:
print(
'Install gdb (package name "mingw32-gdb") using MinGW (https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download), then ensure gdb is on your "Path" environement variable: Control Panel > System Properties > Environment Variables > System Variables > Path'
)
else:
print('try "sudo apt-get install gdb" for Linux or "brew install gdb"')
sys.exit(1)
elif "lldb" in gdb_path.lower() and "lldb-mi" not in app.config["gdb_path"].lower():
pygdbmi.printcolor.print_red(
'gdbgui cannot use the standard lldb executable. You must use an executable with "lldb-mi" in its name.'
)
sys.exit(1)
def verify_gdb_exists(gdb_path):
if find_executable(gdb_path) is None:
pygdbmi.printcolor.print_red(
'gdb executable "%s" was not found. Verify the executable exists, or that it is a directory on your $PATH environment variable.'
% gdb_path
)
if USING_WINDOWS:
print(
'Install gdb (package name "mingw32-gdb") using MinGW (https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download), then ensure gdb is on your "Path" environement variable: Control Panel > System Properties > Environment Variables > System Variables > Path'
)
else:
print('try "sudo apt-get install gdb" for Linux or "brew install gdb"')
sys.exit(1)
elif "lldb" in gdb_path.lower() and "lldb-mi" not in app.config["gdb_path"].lower():
pygdbmi.printcolor.print_red(
'gdbgui cannot use the standard lldb executable. You must use an executable with "lldb-mi" in its name.'
)
sys.exit(1)