I can't debug libc after intall libc6-dbg .who may help me?
1 system info:
root@yes-desktop:/usr/src/eglibc-2.11.1/malloc# uname -a
Linux yes-desktop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
2 gcc version
root@yes-desktop:/usr/src/eglibc-2.11.1/malloc# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
3 instal libc6-dbg
sudo apt-get install libc6-dbg
root@yes-desktop:/usr/lib/debug# ls
lib lib64 sbin usr
4 test operator new
#include <iostream>
2
3 class X
4 {
5 public:
6 virtual void f(){std::cout << "x::x()" << std::endl;}
7 ~X(){}
8 private:
9 int m_x;
10 };
11
12 class Y : public X
13 {
14 public:
15 void f(){std::cout << "Y::Y" << std::endl;}
16 private:
17 int m_y;
18 };
19
20 int main()
21 {
22 X *px = new Y;
23
24 delete px;
25 px = NULL;
26 return 0;
27 }
root@yes-desktop:/home/yes/myprograme# g++ -g -o test test.c
root@yes-desktop:/home/yes/myprograme# ls
a.out dns framework help-dummy.o learn_assembly main main.cpp tags test test.c tt-v4.7.zip
root@yes-desktop:/home/yes/myprograme# ldd test
linux-gate.so.1 => (0x00efb000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00be2000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00446000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x006e0000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x004cb000)
/lib/ld-linux.so.2 (0x00b1e000)
question:
1 why cann't i debug the test? because i cann't step into the "operator new" function.
|