Skip to content

Commands that take address can't parse complex symbols #1050

Description

@disconnect3d

For complex symbols, e.g. comming from C++, GDB can parse them when we provide them in quotes. E.g. x/10i &'A::foo()'.

Sadly, the same does not work with Pwndbg commands - e.g. vmmap or nearpc just can't parse those.

We need to find a way to properly parse addresses/symbols once and for all.

This bug can be reproduced with the following C++ program:

#include <stdio.h>

struct A {
    void foo() { puts("foo"); }
};

int main() {
    A a;
    a.foo();
}

Compiled as g++ -ggdb -O0 main.cpp -o a.out and then ran in GDB.

Then, x/10i &'A::foo()' will show us disassembly but nearpc or vmmap on the same symbol will not work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions