xinfo Exception
See original GitHub issueHello!
I have the following problem:
pwndbg> p printf
$3 = {int (const char *, ...)} 0x7ffff7e33e10 <__printf>
pwndbg> xinfo 0x7ffff7e33e10
Extended information for virtual address 0x7ffff7e33e10:
Containing mapping:
0x7ffff7df4000 0x7ffff7f6c000 r-xp 178000 25000 /usr/lib/x86_64-linux-gnu/libc-2.31.so
Offset information:
Mapped Area 0x7ffff7e33e10 = 0x7ffff7df4000 + 0x3fe10
File (Base) 0x7ffff7e33e10 = 0x7ffff7dcf000 + 0x64e10
'xinfo': Shows offsets of the specified address to useful other locations
Exception occurred: xinfo: argument of type 'int' is not iterable (<class 'TypeError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
more details:
pwndbg> set exception-verbose on
Set whether to print a full stacktracefor exceptions raised in Pwndbg commands to True
pwndbg> xinfo 0x7ffff7e33e10
Extended information for virtual address 0x7ffff7e33e10:
Containing mapping:
0x7ffff7df4000 0x7ffff7f6c000 r-xp 178000 25000 /usr/lib/x86_64-linux-gnu/libc-2.31.so
Offset information:
Mapped Area 0x7ffff7e33e10 = 0x7ffff7df4000 + 0x3fe10
File (Base) 0x7ffff7e33e10 = 0x7ffff7dcf000 + 0x64e10
'xinfo': Shows offsets of the specified address to useful other locations
Traceback (most recent call last):
File "/opt/pwndbg/pwndbg/commands/__init__.py", line 136, in __call__
return self.function(*args, **kwargs)
File "/opt/pwndbg/pwndbg/commands/__init__.py", line 227, in _OnlyWhenRunning
return function(*a, **kw)
File "/opt/pwndbg/pwndbg/commands/xinfo.py", line 126, in xinfo
xinfo_mmap_file(page, addr)
File "/opt/pwndbg/pwndbg/commands/xinfo.py", line 72, in xinfo_mmap_file
containing_loads = [seg for seg in pwndbg.elf.get_containing_segments(file_name, first.vaddr, addr)
File "/opt/pwndbg/pwndbg/elf.py", line 153, in get_containing_segments
if 'LOAD' not in seg['p_type'] and seg['p_filesz'] == 0:
TypeError: argument of type 'int' is not iterable
versions are:
pwndbg> version
Gdb: 9.1
Python: 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]
Pwndbg: 1.1.0 build: 609284c
Capstone: 4.0.1024
Unicorn: 1.0.2
my system:
$ uname -a
Linux ubuntu2004.localdomain 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 20.04 LTS \n \l
more information from bugreport --run-browser
:
Gdb session history:
start
p printf
xinfo 0x7ffff7e33e10
set exception-verbose on
xinfo 0x7ffff7e33e10
Platform: Linux-5.4.0-29-generic-x86_64-with-glibc2.29
Gdb: 9.1
Python: 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]
Pwndbg: 1.1.0 build: 609284c
Capstone: 4.0.1024
Unicorn: 1.0.2
This GDB was configured as follows:
configure --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-auto-load-dir=$debugdir:$datadir/auto-load
--with-auto-load-safe-path=$debugdir:$datadir/auto-load
--with-expat
--with-gdb-datadir=/usr/share/gdb (relocatable)
--with-jit-reader-dir=/usr/lib/gdb (relocatable)
--without-libunwind-ia64
--with-lzma
--with-babeltrace
--without-intel-pt
--with-mpfr
--without-xxhash
--with-python=/usr (relocatable)
--without-guile
--disable-source-highlight
--with-separate-debug-dir=/usr/lib/debug (relocatable)
--with-system-gdbinit=/etc/gdb/gdbinit
I also attached the file I used: relocoverwrite.zip
Best Martin
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
xInfo.num Method (Dynamics.AX.Application) | Microsoft Learn
An integer that represents the number of exceptions of the type specified by the exceptionType parameter, or the total number of lines in...
Read more >Exception Handling in LLVM — LLVM 16.0.0git documentation
LLVM landing pads are conceptually alternative function entry points where an exception structure reference and a type info index are passed in as...
Read more >ex-info - clojure.core | ClojureDocs - ClojureDocs
Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data. © Rich Hickey. All rights reserved. Eclipse Public ......
Read more >Error in invoking target 'libasmclntsh19.ohso libasmperl19 ...
INFO : Exception thrown from action: make. Exception Name: MakefileException. Exception String: Error in invoking target 'libasmclntsh19.ohso ...
Read more >How do I log an exception at warning- or info-level with ...
From the logging documentation: There are three keyword arguments in kwargs which are inspected: exc_info , stack_info , and extra .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome! I just checked the dev branch and everything is working as expected! 😃 Thanks a lot for investigating and fixing the bug so quickly =)
It also seems that it effects Ubuntu 19.10 (gdb 8.3) as well…:
Ubuntu 18.04 WORKS
Ubuntu 19.10 EXCEPTION
Ubuntu 20.04 EXCEPTION
I wrote a little shell script and Dockerfile that makes the testing a bit easier:
run_containers.sh
:Dockerfile
:Here is a zipped version of all the files: pwndbg_xinfo_test.zip