mirror of https://github.com/pwndbg/pwndbg
Do not sort auxv, use the implicit order
This commit is contained in:
parent
526b3ea9c6
commit
1c633829de
|
@ -81,9 +81,6 @@ sys.modules[__name__].__dict__.update({v:k for k,v in AT_CONSTANTS.items()})
|
|||
|
||||
|
||||
class AUXV(dict):
|
||||
def __init__(self):
|
||||
for field in AT_CONSTANTS.values():
|
||||
self[field] = None
|
||||
def set(self, const, value):
|
||||
name = AT_CONSTANTS.get(const, "AT_UNKNOWN%i" % const)
|
||||
|
||||
|
@ -97,7 +94,7 @@ class AUXV(dict):
|
|||
|
||||
self[name] = value
|
||||
def __getattr__(self, attr):
|
||||
return self[attr]
|
||||
return self.get(attr)
|
||||
def __str__(self):
|
||||
return str({k:v for k,v in self.items() if v is not None})
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@ import pwndbg.commands
|
|||
@pwndbg.commands.ArgparsedCommand('Print information from the Auxiliary ELF Vector.')
|
||||
@pwndbg.commands.OnlyWhenRunning
|
||||
def auxv():
|
||||
for k, v in sorted(pwndbg.auxv.get().items()):
|
||||
for k, v in pwndbg.auxv.get().items():
|
||||
if v is not None:
|
||||
print(k.ljust(24), v if not isinstance(v, int) else pwndbg.chain.format(v))
|
||||
|
|
Loading…
Reference in New Issue