Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump gdb pt dump #1205

Merged
merged 4 commits into from
Dec 7, 2022
Merged

Bump gdb pt dump #1205

merged 4 commits into from
Dec 7, 2022

Conversation

disconnect3d
Copy link
Member

No description provided.

@disconnect3d
Copy link
Member Author

Would be nice to test it before merge

@gsingh93
Copy link
Member

gsingh93 commented Oct 3, 2022

I've actually been getting this exception when connecting to QEMU for a while:

Traceback (most recent call last):
  File "/home/gsgx/code/pwndbg/pwndbg/gdblib/events.py", line 169, in caller
    raise e
  File "/home/gsgx/code/pwndbg/pwndbg/gdblib/events.py", line 164, in caller
    func()
  File "/home/gsgx/code/pwndbg/pwndbg/vmmap.py", line 652, in mark_pc_as_executable
    mapping = find(pwndbg.gdblib.regs.pc)
  File "/home/gsgx/code/pwndbg/pwndbg/lib/memoize.py", line 51, in __call__
    value = self.func(*args, **kwargs)
  File "/home/gsgx/code/pwndbg/pwndbg/vmmap.py", line 113, in find
    for page in get():
  File "/home/gsgx/code/pwndbg/pwndbg/lib/memoize.py", line 51, in __call__
    value = self.func(*args, **kwargs)
  File "/home/gsgx/code/pwndbg/pwndbg/vmmap.py", line 73, in get
    pages.extend(kernel_vmmap_via_page_tables())
  File "/home/gsgx/code/pwndbg/pwndbg/lib/memoize.py", line 51, in __call__
    value = self.func(*args, **kwargs)
  File "/home/gsgx/code/pwndbg/pwndbg/vmmap.py", line 385, in kernel_vmmap_via_page_tables
    pages = p.backend.parse_tables(p.cache, p.parser.parse_args(""))
  File "/home/gsgx/code/pwndbg/gdb-pt-dump/pt_x86_64_parse.py", line 210, in parse_tables
    raise Exception("Paging is not enabled")
Exception: Paging is not enabled

But vmmap still works fine:

pwndbg> vmmap
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
          0x400000           0x401000 r--p     1000 0      <pt>
          0x401000           0x411000 r-xp    10000 0      <pt>
          0x420000           0x460000 r-xp    40000 0      <pt>
          0x470000           0x4a0000 r-xp    30000 0      <pt>
          0x4b0000           0x4e0000 r-xp    30000 0      <pt>
          0x4f0000           0x540000 r-xp    50000 0      <pt>
          0x580000           0x5a0000 r-xp    20000 0      <pt>
          0x5e0000           0x5f8000 r-xp    18000 0      <pt>
          0x620000           0x670000 r--p    50000 0      <pt>
          0x680000           0x68d000 r--p     d000 0      <pt>
          0x68d000           0x693000 rw-p     6000 0      <pt>
         0x2538000          0x253f000 rw-p     7000 0      <pt>
    0x7ffc4f4d8000     0x7ffc4f4dc000 rw-p     4000 0      <pt>
    0x7ffc4f518000     0x7ffc4f519000 r-xp     1000 0      <pt>
0xffff888000000000 0xffff888000099000 rw-p    99000 0      <pt>
0xffff888000099000 0xffff88800009a000 r--p     1000 0      <pt>
0xffff88800009a000 0xffff88800009b000 r-xp     1000 0      <pt>
0xffff88800009b000 0xffff888001000000 rw-p   f65000 0      <pt>
...
0xffffff3b001c4000 0xffffff3b001c5000 r--p     1000 0      <pt>
0xffffff3b001d4000 0xffffff3b001d5000 r--p     1000 0      <pt>
0xffffff3b001e4000 0xffffff3b001e5000 r--p     1000 0      <pt>
0xffffff3b001f4000 0xffffff3b001f5000 r--p     1000 0      <pt>
0xffffffff81000000 0xffffffff81e05000 r-xp   e05000 0      <pt>
0xffffffff82000000 0xffffffff8233d000 r--p   33d000 0      <pt>
0xffffffff82400000 0xffffffff829a6000 rw-p   5a6000 0      <pt>
0xffffffff82af7000 0xffffffff82e00000 rw-p   309000 0      <pt>
0xffffffffc0000000 0xffffffffc0001000 r-xp     1000 0      <pt>
0xffffffffc0001000 0xffffffffc0002000 r--p     1000 0      <pt>
0xffffffffc0002000 0xffffffffc0004000 rw-p     2000 0      <pt>
0xffffffffff5fb000 0xffffffffff5fd000 rw-p     2000 0      <pt>

[QEMU target detected - vmmap result might not be accurate; see `help vmmap`]

@gsingh93
Copy link
Member

gsingh93 commented Dec 2, 2022

We should bump to the latest version after martinradev/gdb-pt-dump#21 is merged.

@disconnect3d disconnect3d merged commit 12488fb into dev Dec 7, 2022
@disconnect3d disconnect3d deleted the bump-gdb-pt-dump branch December 7, 2022 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants