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

Assembly window not showing function names #265

Open
securitytime opened this issue Apr 4, 2022 · 1 comment
Open

Assembly window not showing function names #265

securitytime opened this issue Apr 4, 2022 · 1 comment

Comments

@securitytime
Copy link

In the Assembly window, I am not seeing the function names. Instead, only "?"s are shown (I marked it red):

image

When I switch to "layout asm", the function names are displayed correctly:

image

Is this a bug?

To reproduce, I wrote a simple "Hello World" C program on Kali Linux and compiled it with gcc -o helloworld helloworld.c.

@cyrus-and
Copy link
Owner

Eh, that happens because GDB keeps that information from us Python API users:

>>> python print(gdb.selected_frame().function().name)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'name'
Error while executing Python code.

That information is available when the program is compiled with debug symbols (e.g., -g).

It has been historically very hard to figure out the current function information (name and boundaries), there is a huge number of corner cases and the GDB Python API doesn't really help (at least the last time I checked). Any suggestions are more than welcome...

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

No branches or pull requests

2 participants