(self, which)
return 0
Supports fetching based on segmented addressing, a la fs:[0x30].

        Requires ptrace'ing the child directly.
Supports fetching based on segmented addressing, a la fs:[0x30].
Supports fetching based on segmented addressing a la fs : [ 0x30 ] .
def _fs_gs_helper(self, which):
        """Supports fetching based on segmented addressing, a la fs:[0x30].

        Requires ptrace'ing the child directly."""

        # We can't really do anything if the process is remote.
        if pwndbg.remote.is_remote(): return 0

        # Use the lightweight process ID
        pid, lwpid, tid = gdb.selected_thread().ptid

        # Get the register
        ppvoid = ctypes.POINTER(ctypes.c_void_p)
        value  = ppvoid(ctypes.c_void_p())
        value.contents.value = 0

        libc  = ctypes.CDLL('libc.so.6')
        result = libc.ptrace(PTRACE_ARCH_PRCTL,
                             lwpid,
                             value,
                             which)

        if result == 0:
            return (value.contents.value or 0) & pwndbg.arch.ptrmask

        return 0
def _fs_gs_helper ( self , which ) : # We can't really do anything if the process is remote. if pwndbg . remote . is_remote ( ) : return 0 # Use the lightweight process ID pid , lwpid , tid = gdb . selected_thread ( ) . ptid # Get the register ppvoid = ctypes . POINTER ( ctypes . c_void_p ) value = ppvoid ( ctypes . c_void_p ( ) ) value . contents . value = 0 libc = ctypes . CDLL ( 'libc.so.6' ) result = libc . ptrace ( PTRACE_ARCH_PRCTL , lwpid , value , which ) if result == 0 : return ( value . contents . value or 0 ) & pwndbg . arch . ptrmask return 0