(self)
Locate a thread's tcache struct. If it doesn't have one, use the main
        thread's tcache.
Locate a thread's tcache struct. If it doesn't have one, use the main
        thread's tcache.
Locate a thread s tcache struct . If it doesn t have one use the main thread s tcache .
def thread_cache(self):
        """Locate a thread's tcache struct. If it doesn't have one, use the main
        thread's tcache.
        """
        if self.has_tcache():
            tcache = self.mp['sbrk_base'] + 0x10
            if self.multithreaded:
                tcache_addr = pwndbg.memory.pvoid(pwndbg.symbol.address('tcache'))
                if tcache_addr != 0:
                    tcache = tcache_addr

            try:
                self._thread_cache = pwndbg.memory.poi(self.tcache_perthread_struct, tcache)
                _ = self._thread_cache['entries'].fetch_lazy()
            except Exception as e:
                print(message.error('Error fetching tcache. GDB cannot access '
                                    'thread-local variables unless you compile with -lpthread.'))
                return None

            return self._thread_cache

        else:
            print(message.warn('This version of GLIBC was not compiled with tcache support.'))
            return None
def thread_cache ( self ) : if self . has_tcache ( ) : tcache = self . mp [ 'sbrk_base' ] + 0x10 if self . multithreaded : tcache_addr = pwndbg . memory . pvoid ( pwndbg . symbol . address ( 'tcache' ) ) if tcache_addr != 0 : tcache = tcache_addr try : self . _thread_cache = pwndbg . memory . poi ( self . tcache_perthread_struct , tcache ) _ = self . _thread_cache [ 'entries' ] . fetch_lazy ( ) except Exception as e : print ( message . error ( 'Error fetching tcache. GDB cannot access ' 'thread-local variables unless you compile with -lpthread.' ) ) return None return self . _thread_cache else : print ( message . warn ( 'This version of GLIBC was not compiled with tcache support.' ) ) return None