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

No symbol "main_arena" in current context. #30

Open
annemacedo-tw opened this issue Oct 16, 2023 · 2 comments
Open

No symbol "main_arena" in current context. #30

annemacedo-tw opened this issue Oct 16, 2023 · 2 comments

Comments

@annemacedo-tw
Copy link

I currently have a docker setup with GDB, like this

I'm trying to debug a python3 app, I have python3-dbg installed on the docker container with GDB.

[Current thread is 1 (LWP 9335)]
Traceback (most recent call last):
  File "<string>", line 5, in <module>
  File "/home/gdb-heap/gdbheap.py", line 17, in <module>
    from heap.commands import register_commands
  File "/home/gdb-heap/heap/commands.py", line 21, in <module>
    from heap.glibc import glibc_arenas
  File "/home/gdb-heap/heap/glibc.py", line 445, in <module>
    glibc_arenas = GlibcArenas()
  File "/home/gdb-heap/heap/glibc.py", line 415, in __init__
    self.main_arena = self.get_main_arena()
  File "/home/gdb-heap/heap/glibc.py", line 420, in get_main_arena
    return gdb.parse_and_eval("main_arena")
gdb.error: No symbol "main_arena" in current context.
/home/gdb-heap-commands:7: Error in sourced command file:

Seems similar to hugsy/gef#81

retpolanne added a commit to retpolanne/gdb-heap that referenced this issue Oct 16, 2023
@rogerhu
Copy link
Owner

rogerhu commented Oct 16, 2023

The commit that mostly flags an exception for the link you mentioned is here: SakiiR/gef@c373f0c

Are you generating the core dump from inside/outside the container? Are you using gdb with access to the debug version of libc as well?

https://stackoverflow.com/questions/37960788/why-there-isnt-main-arena-in-libc-so-symbol-table-while-there-is-one-in-malloc

@retpolanne
Copy link

Hey @rogerhu .

I'm generating the core dump from inside the container. I believe I was using gdb with debug libc.

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

No branches or pull requests

3 participants