Debug mit gdb

Aus metasec wiki
Wechseln zu: Navigation, Suche
root@meta-embeddedV2:/usr/local/pse/embeddedBrowser# apt-get install gdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  xfonts-scalable libx11-xcb1 xfonts-75dpi libdrm-nouveau1 xfonts-100dpi libxvmc1 libxcb-dri2-0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  gdbserver libpython2.6
Suggested packages:
  gdb-doc
The following NEW packages will be installed:
  gdb gdbserver libpython2.6
0 upgraded, 3 newly installed, 0 to remove and 77 not upgraded.
Need to get 3,053 kB of archives.
After this operation, 6,754 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp.egr.msu.edu/debian/ squeeze/main libpython2.6 i386 2.6.6-8+b1 [985 kB]
Get:2 http://ftp.egr.msu.edu/debian/ squeeze/main gdbserver i386 7.0.1-2+b1 [185 kB]
Get:3 http://ftp.egr.msu.edu/debian/ squeeze/main gdb i386 7.0.1-2+b1 [1,883 kB]
Fetched 3,053 kB in 17s (178 kB/s)
Selecting previously deselected package libpython2.6.
(Reading database ... 59195 files and directories currently installed.)
Unpacking libpython2.6 (from .../libpython2.6_2.6.6-8+b1_i386.deb) ...
Selecting previously deselected package gdbserver.
Unpacking gdbserver (from .../gdbserver_7.0.1-2+b1_i386.deb) ...
Selecting previously deselected package gdb.
Unpacking gdb (from .../gdb_7.0.1-2+b1_i386.deb) ...
Processing triggers for man-db ...
Setting up libpython2.6 (2.6.6-8+b1) ...
Setting up gdbserver (7.0.1-2+b1) ...
Setting up gdb (7.0.1-2+b1) ...
root@meta-embeddedV2:/usr/local/pse/embeddedBrowser# gdb ./embeddedBrowser
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 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 "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/pse/embeddedBrowser/embeddedBrowser...done.
(gdb) run -qws
Starting program: /usr/local/pse/embeddedBrowser/embeddedBrowser -qws
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb65a203e in ?? ()
(gdb) bt
#0  0xb65a203e in ?? ()
#1  0xb6300227 in ts_load_module_raw () from /usr/local/pse/tslib/lib/libts-0.0.so.0
#2  0xb62ffe34 in ts_config () from /usr/local/pse/tslib/lib/libts-0.0.so.0
#3  0xb6ac4d94 in ?? () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#4  0xb6ac5b09 in ?? () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#5  0xb6ac5dbc in ?? () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#6  0xb6ab8689 in QMouseDriverFactory::create(QString const&, QString const&) ()
   from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#7  0xb6a9e1f2 in ?? () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#8  0xb6a9e3ca in QWSServer::openMouse() () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#9  0xb6a9f886 in ?? () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#10 0xb6a9ff19 in QWSServer::startup(int) () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#11 0xb6b49f4e in ?? () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#12 0xb6ad17ee in QApplicationPrivate::construct() () from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#13 0xb6ad1d8b in QApplication::QApplication(int&, char**, int) ()
   from /usr/local/pse/qtembedded/lib/libQtGui.so.4
#14 0x0805c89a in main ()
(gdb) quit
A debugging session is active.

        Inferior 1 [process 25294] will be killed.

Quit anyway? (y or n) y