The GNU Debugger usually called just GDB

learn more… | top users | synonyms

0
votes
0answers
19 views

GDB not showing C code when gcc -g option is used

I have a file called hello_world.c. I use the command gcc -g -Wall hello_world.c Then gdb ./a.out I set a breakpoint at line 27 And run, it tells me this: warning: no loadable sections found in ...
0
votes
0answers
23 views

“Code 126: Permission Denied” when using GDB Debugger

I have written a piece of C++ code and am trying to debug that using GDB Debugger. The code uses bunch of libraries, so I am using a make-file to compile and link all the required libraries, which I ...
1
vote
0answers
14 views

Unable to generate core dump after apport disable

Hi I'm currently programming c++ on Ubuntu and am unable to generate a core dump with a segmentation fault. I just get "Segementation fault" and not the (core dump) I have set ulimit -c unlimited. I ...
0
votes
2answers
77 views

libpython2.6.so.1.0 doesn't exist

I am trying to run an application called powerpc-eabi-gdb, however, when I start it, I get the following error: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object ...
0
votes
0answers
140 views

Compiled packages and apt-get mess

Due to my work I have to use the last version of gdb (7.7) which is not provide in the ubuntu repositories. For that purpose I download the source code, compiled it and installed it successfully. My ...
1
vote
1answer
135 views

Generating core files on Ubuntu

Recently I've been trying to enable core dumps on Ubuntu. I made a simple program, that would crash (it writes some data out of array). At first, core dumps weren't generated. This was because ulimit ...
1
vote
0answers
26 views

how to find specific string or hex value under gdb

Based on physical memory address where I'm started draw from "hexdump -C" commands as below. 0040f4f0 53 48 45 4c 4c 43 4f 44 45 3d 54 68 69 73 20 6c |SHELLCODE=This l| 0040f500 69 6e 65 20 69 73 ...
3
votes
1answer
465 views

Setting up GDB pretty printing in Ubuntu 13.10

I tried to set up GDB pretty printing (for easier work with standard containers) according to this anwer. Instead of using python pretty printers code from svn I used the ones that ship with ubuntu. ...
0
votes
0answers
16 views

Need help in understanding the contents of registers as displayed by the info registers in gdb

I am using infinite recursion to generate core and to understand debugging it with gdb. void foo(){ return foo(); } int main(){ foo(); return 0; } Can you explain me the "info register" of ...
0
votes
0answers
96 views

Linux Kernel Remote Debugging using GDB

I am trying to debug linux kernel using remote connection through gdb. I have followed the below steps, but there is "connection timeout" error @ HOST PC. I have a Host PC (running ubuntu 12.04) and ...
1
vote
1answer
1k views

libncurses.so.5 : Error while loading shared libraries

I tried to debug a C application with Eclipse using GDB but I got the following error: Error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or ...
0
votes
2answers
189 views

Why is gdb looking for assembly files?

I am attempting to learn about gdb using Ubuntu 13.10. I am using the gcc compiler and following example: https://en.wikipedia.org/wiki/Gdb#An_example_session Instead of the output shown in the ...
0
votes
0answers
83 views

ptrace(attach) failing while attaching a thread from another thread (of same process)

1 #include <stdio.h> 2 #include <pthread.h> 3 #include <sys/ptrace.h> 4 #include <sys/types.h> 5 #include <sys/wait.h> 6 #include <unistd.h> 7 #include ...
2
votes
1answer
789 views

GDB crashes with: ImportError: No module named libstdcxx.v6.printers

I have a problem with GDB. Whenever I try to debug any C++ program, just after running it, GDB gives this error: (gdb) run Starting program: /home/errikos/Workspaces/tests/a.out Traceback (most ...
0
votes
2answers
514 views

Gdb symbol lookup error

I'm trying to use gdb on ubuntu 12.04, but every time the program crashes with the following error gdb: symbol lookup error: gdb: undefined symbol: PyUnicodeUCS4_FromEncodedObject Looks something ...
4
votes
2answers
130 views

Why debug packages don't include sources?

I was expecting that after installing the package libgtk-3-0-dbg I would get DDD to show the source code when stepping into gtk+, however I had to download the source package myself (from here) and ...
0
votes
0answers
27 views

vi history keystrokes in gdb version 7.5

Hi I am using gdb version 7.5. Can someone tell me how I can get the vim keystrokes to work inside the gdb? The up and down arrow keys work for history but I want the k and j to work similar to ...
0
votes
1answer
761 views

How do I set up pretty printing gdb 7.5

I thought gdb 7.0 and higher has pretty printing included in it but I might be wrong? Can someone point me to the correct way to use this? Do I need to create a .gdbinit file for this? I tried copying ...
1
vote
1answer
541 views

gdb uses wrong python

When I launch gdb (on Ubuntu 12.04 LTS) it immediately crashes with the following output: BlockquoteTraceback (most recent call last): File "/usr/lib/python2.7/site.py", line 562, in <module> ...
0
votes
1answer
251 views

Help with GDB on a C++ program

I am new to Ubuntu and am using the 12.04 version on my laptop. I am trying to execute a C++ program which has Petsc libraries installed in it. I get an error when trying to run the program and so ...
1
vote
1answer
59 views

Make works fine, but the result does not run. What now?

I am trying to run https://github.com/seanpringle/simpleswitcher on my ubuntu 12.04 I downloaded it and compiled it. However, when I run I get *** glibc detected *** ./simpleswitcher: free(): ...
0
votes
0answers
54 views

How can I use debugging symbols for wxwidgets in gdb?

The debugging packages for wxwidgets install separate libraries named e.g. libwx_gtk2ud_core-2.8.so, where the ud part indicates debugging builds, rather than debugging symbols for the standard ...
2
votes
2answers
5k views

warning: GDB: Failed to set controlling terminal: Operation not permitted

I'm using Code-blocks IDE in my Ubuntu 12.10.But when I'm trying to debug any project , I got the following warning : warning: GDB: Failed to set controlling terminal: Operation not permitted ...
3
votes
3answers
1k views

segmentation fault when using su or sudo

example of the problem: $ su Segmentation fault $ sudo ls Segmentation fault I tried to compile sqlite3 from source earlier. I don't know what libraries it installed. This may be the reason why ...
2
votes
1answer
923 views

gdb cannot run due to python error

I am trying to run gdb, but as soon as I hit enter I get this error Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 562, in <module> main() File ...
2
votes
0answers
219 views

Ubuntu 12.10 - How to use gdb to debug a kernel module?

I am trying to use gdb to view function calls of my wireless driver. My driver is ath5k. In my opinion, all things that I have to do is: using gdb to debug ath5k module. Is it right? Anybody can give ...
1
vote
0answers
104 views

How to extract backtrace from a core file without entering into GDB console

I have core file generated by a crash , my requirement is without entering into gdb console i want to print the backtrace, can somebody help me or point me to docs.
3
votes
1answer
864 views

How can I get python stack trace information using GDB?

I am using GDB to debug a segmentation fault in my python application on Kubuntu 12.04. Supposedly GDB version 7 has built-in macros for extracting information about the python stack ...
0
votes
2answers
683 views

How to get the eglibc source code used by Ubuntu?

How do I get the source code for eglibc in a format that will allow stepping through the source with gdb? I have tried using apt-get source libc6-dev and that works for getting the source code, but ...
0
votes
1answer
164 views

How can I run hp-systray from gdb?

I would like to be able to run hp-systray from gdb to get a stacktrace and help fix a very annoying bug that's been around for a while now. However, if I try to run gdb hp-systray 2>&1 | tee ...
4
votes
2answers
2k views

How can I debug Ubuntu's kernel?

How can I debug Ubuntu's kernel? Are there any debug symbols available, or should I recompile the kernel with debug info?
7
votes
0answers
338 views

Error while reading shared library symbols for /lib/ld-linux.so.2 [closed]

When I try and run these commands (in order): gdb -tui main layout regs b main r s It gives me a ton of errors on the 'r' command, giving the error in the title, so I can't even debug my program. ...
4
votes
1answer
804 views

Debugging applications in QTCreator

Everytime i go to debug some code in QTCreator, i get this GDB error returning. Current setup: Ubuntu 11.04 QT Creator version: 2.1.0 GDB Version: GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2 Debugging ...