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

troubles to get gdb utils working for libluajit #9

Closed
hkmo opened this issue Nov 28, 2016 · 3 comments
Closed

troubles to get gdb utils working for libluajit #9

hkmo opened this issue Nov 28, 2016 · 3 comments

Comments

@hkmo
Copy link

hkmo commented Nov 28, 2016

Hi, I am just trying to use this tool, and I have some troubles:

gdb

GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
(gdb) source luajit21.py
(gdb) lvmst
Traceback (most recent call last):
File "luajit21.py", line 597, in invoke
L = get_cur_L()
File "luajit21.py", line 127, in get_cur_L
mL = get_global_L()
File "luajit21.py", line 113, in get_global_L
gL, _ = gdb.lookup_symbol("globalL")
gdb.error: No frame selected.
Error occurred in Python command: No frame selected.

echo $PYTHONPATH

/root/uc/nginx-gdb-utils

I also updated the ~/.gdbinit with the above path.

Please let me know what is missing to get this tool working.
Also, please let me know how to use this tool in case I have a core dump on libluajit-5.1.so.

Thanks

@agentzh
Copy link
Member

agentzh commented Nov 28, 2016

@hkmo How did you start gdb? It seems that your gdb session is not loading your core at all.

@hkmo
Copy link
Author

hkmo commented Nov 29, 2016

By just calling gdb without any parameter.
gdb

Do you have any example of using this tool to debug libluajit or to debug lua script? That would help.
Thanks

@agentzh
Copy link
Member

agentzh commented Nov 29, 2016

@hkmo You are running gdb in the wrong way. Gdb cannot know your executable file nor your core dump file automatically. You need to tell it:

gdb path/to/the/binary path/to/the/core

@agentzh agentzh closed this as completed Nov 29, 2016
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

2 participants