Unable to install & use 'gdb-heap' on Ubuntu for post-debugging with coredump
Closed this issue · 9 comments
I have a coredump generated on other device for my C code. I am trying to debug that core on my system, considering memory corruption as probable cause.
Please provide steps to install & use 'gdb-heap' on my system. Please help me.
/home/user1$ cat gdb-heap-commands
python
import sys
sys.path.insert(0, "/usr/share/glib-2.0/gdb")
sys.path.append("/usr/share/glib-2.0/gdb")
sys.path.append("/home/user1/gdb-heap")
import gdbheap
end
/home/user1$ gdb -x gdb-heap-commands
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 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 "i686-linux-gnu".
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/.
Traceback (most recent call last):
File "", line 5, in
ImportError: No module named gdbheap
gdb-heap-commands:7: Error in sourced command file:
Error while executing Python code.
(gdb)
You may need to revise /home/user1/gdb-heap to be /home/user1/gdb-heap/heap
Scratch that...confirm that you have gdbheap in /home/user1/gdb-heap.
No I don't have 'gdbheap' within '/home/user1/gdb-heap'
~$ ls gdb-heap
gdbheap.py LICENSE-lgpl-2.1.txt LICENSE.txt object-sizes.py run-gdb-heap
heap LICENSE-python.txt make-release.sh resultparser.py selftest.py
I verified with both https://github.com/rogerhu/gdb-heap & https://fedorahosted.org/gdb-heap/
Yeah gdbheap.py I mean.
Please help me to proceed further and resolve error.
My guess is that init.py needs to be added. Please create a blank file and see if it works.
Still getting same error.
Works fine for me:
cd /tmp
sudo apt-get install libc6-dev libc6-dbg python-gi libglib2.0-dev python-ply
git clone git@github.com:rogerhu/gdb-heap.git
cd /tmp/gdb-heap
(gdb) python
import sys
sys.path.insert(0, "/usr/share/glib-2.0/gdb")
sys.path.append("/usr/share/glib-2.0/gdb")
sys.path.append("/tmp/gdb-heap")
import gdbheap
end
I think this is a non-issue. Feel free to comment but I think your dir structure is probably at issue.