Skip to content

Attachp

parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description='Attaches to a given pid, process name, process found with partial argv match or to a device file.\n\nThis command wraps the original GDB `attach` command to add the ability\nto debug a process with a given name or partial name match. In such cases,\nthe process identifier is fetched via the `pidof <name>` command first. If no\nmatches are found, then it uses the `ps -eo pid,args` command to search for\npartial name matches.\n\nOriginal GDB attach command help:\n Attach to a process or file outside of GDB.\n This command attaches to another target, of the same type as your last\n "target" command ("info files" will show your target stack).\n The command may take as argument a process id or a device file.\n For a process id, you must have permission to send the process a signal,\n and it must have the same effective uid as the debugger.\n When using "attach" with a process id, the debugger finds the\n program running in the process, looking first in the current working\n directory, or (if not found there) using the source file search path\n (see the "directory" command). You can also use the "file" command\n to specify the program, and to load its symbol table.') module-attribute

attachp(target, no_truncate, retry, all, user=None)

find_pids(target, user, all)