# Buggy code
def use_info_auxv():
    lines = pwndbg.info.auxv().splitlines()

    if not lines:
        return None

    auxv = AUXV()
    for line in lines:
        match = re.match("([0-9]+) .* (0x[0-9a-f]+|[0-9]+)", line)
        if not match:
            print("Warning: Skipping auxv entry '{}'".format(line))
            continue

        const, value = int(match.group(1)), int(match.group(2), 0)
        auxv.set(const, value)

    return auxv


# Traceback (ValueError)
$ pwd
/home/user/test/x 01
$ cat test.c
#include <stdio.h>
#include <stdlib.h>

void main()
{
printf("Hello world\n");
getchar();
}
$ gcc -o test test.c
$ gdb test
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
pwndbg: loaded 191 commands. Type pwndbg [filter] for a list.
pwndbg: created $rebase, $ida gdb functions (can be used with print/break)
Reading symbols from test...
(No debugging symbols found in test)
pwndbg> r
Starting program: /home/user/test/x 01/test
Hello world
^C
Program received signal SIGINT, Interrupt.
0x00007ffff7ebe142 in __GI___libc_read (fd=0, buf=0x5555555596b0, nbytes=1024) at ../sysdeps/unix/sysv/linux/read.c:26
26      ../sysdeps/unix/sysv/linux/read.c: No such file or directory.
Exception occurred: Error: invalid literal for int() with base 0: '01' (<class 'ValueError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Python Exception <class 'ValueError'> invalid literal for int() with base 0: '01':
Exception occurred: Error: invalid literal for int() with base 0: '01' (<class 'ValueError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Python Exception <class 'ValueError'> invalid literal for int() with base 0: '01':
Exception occurred: Error: invalid literal for int() with base 0: '01' (<class 'ValueError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Python Exception <class 'ValueError'> invalid literal for int() with base 0: '01':
pwndbg> set exception-debugger on
Set whether to debug exceptions raised in Pwndbg commands to True
Traceback (most recent call last):
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 79, in update
page  = pwndbg.memory.Page(start, stop-start, 6 if not is_executable() else 7, 0, '[stack]')
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 127, in is_executable
ehdr         = pwndbg.elf.exe()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 180, in exe
e = entry()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 191, in entry
entry = pwndbg.auxv.get().AT_ENTRY
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 106, in get
return use_info_auxv() or walk_stack() or AUXV()
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 121, in use_info_auxv
const, value = int(match.group(1)), int(match.group(2), 0)
ValueError: invalid literal for int() with base 0: '01'

If that is an issue, you can report it on https://github.com/pwndbg/pwndbg/issues
(Please don't forget to search if it hasn't been reported before)
To generate the report and open a browser, you may run `bugreport --run-browser`
PS: Pull requests are welcome
/home/user/pwndbg/pwndbg/pwndbg/auxv.py(121)use_info_auxv()
-> const, value = int(match.group(1)), int(match.group(2), 0)
(Pdb) q
Traceback (most recent call last):
File "/home/user/pwndbg/pwndbg/pwndbg/prompt.py", line 33, in prompt_hook
pwndbg.events.after_reload(start=False)
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 216, in after_reload
f()
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 169, in caller
raise e
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 79, in update
page  = pwndbg.memory.Page(start, stop-start, 6 if not is_executable() else 7, 0, '[stack]')
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 127, in is_executable
ehdr         = pwndbg.elf.exe()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 180, in exe
e = entry()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 191, in entry
entry = pwndbg.auxv.get().AT_ENTRY
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 106, in get
return use_info_auxv() or walk_stack() or AUXV()
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 121, in use_info_auxv
const, value = int(match.group(1)), int(match.group(2), 0)
ValueError: invalid literal for int() with base 0: '01'
pwndbg> info auxv
33   AT_SYSINFO_EHDR      System-supplied DSO's ELF header 0x7ffff7fce000
16   AT_HWCAP             Machine-dependent CPU capability hints 0xbfebfbff
6    AT_PAGESZ            System page size               4096
17   AT_CLKTCK            Frequency of times()           100
3    AT_PHDR              Program headers for program    0x555555554040
4    AT_PHENT             Size of program header entry   56
5    AT_PHNUM             Number of program headers      13
7    AT_BASE              Base address of interpreter    0x7ffff7fcf000
8    AT_FLAGS             Flags                          0x0
9    AT_ENTRY             Entry point of program         0x555555555080
11   AT_UID               Real user ID                   1000
12   AT_EUID              Effective user ID              1000
13   AT_GID               Real group ID                  1001
14   AT_EGID              Effective group ID             1001
23   AT_SECURE            Boolean, was exec setuid-like? 0
25   AT_RANDOM            Address of 16 random bytes     0x7fffffffdff9
26   AT_HWCAP2            Extension of AT_HWCAP          0x0
31   AT_EXECFN            File name of executable        0x7fffffffefde "/home/user/test/x 01/test"
15   AT_PLATFORM          String identifying platform    0x7fffffffe009 "x86_64"
0    AT_NULL              End of vector                  0x0
Traceback (most recent call last):
File "/home/user/pwndbg/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 79, in update
page  = pwndbg.memory.Page(start, stop-start, 6 if not is_executable() else 7, 0, '[stack]')
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/stack.py", line 127, in is_executable
ehdr         = pwndbg.elf.exe()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 180, in exe
e = entry()
File "/home/user/pwndbg/pwndbg/pwndbg/proc.py", line 71, in wrapper
return func(*a, **kw)
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/elf.py", line 191, in entry
entry = pwndbg.auxv.get().AT_ENTRY
File "/home/user/pwndbg/pwndbg/pwndbg/memoize.py", line 44, in __call__
value = self.func(*args, **kwargs)
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 106, in get
return use_info_auxv() or walk_stack() or AUXV()
File "/home/user/pwndbg/pwndbg/pwndbg/auxv.py", line 121, in use_info_auxv
const, value = int(match.group(1)), int(match.group(2), 0)
ValueError: invalid literal for int() with base 0: '01'

/home/user/pwndbg/pwndbg/pwndbg/auxv.py(121)use_info_auxv()
-> const, value = int(match.group(1)), int(match.group(2), 0)
(Pdb)

# Fixed code
def use_info_auxv():
    lines = pwndbg.info.auxv().splitlines()

    if not lines:
        return None

    auxv = AUXV()
    for line in lines:
        match = re.match("([0-9]+) .*? (0x[0-9a-f]+|[0-9]+)", line)
        if not match:
            print("Warning: Skipping auxv entry '{}'".format(line))
            continue

        const, value = int(match.group(1)), int(match.group(2), 0)
        auxv.set(const, value)

    return auxv