Questions tagged [gdb]
The GNU Debugger usually called just GDB
90
questions
2
votes
2
answers
558
views
Mouse click not working while debugging with GDB
I'm trying to debug a windowed application with GDB in Ubuntu.
First I set a breakpoint in the code.
Then, while running the windowed application, the program stops at the breakpoint at some time.
...
2
votes
1
answer
5k
views
When I run the debugger: "failed to set controlling terminal" [duplicate]
In a book I read, the author's CPU was 32-bit. Mine is 64-bit. I run the NASM assembler in the terminal with:
nasm -f elf -g -F stabs asmwork/eatsyscall.asm
Then I run the linker:
ld -o eatsyscall ...
0
votes
0
answers
178
views
Does Ubuntu not provide debuginfod for gdb?
The operating system I am currently using is Ubuntu 22.04 (Jammy Jellyfish).
I referred to Ubuntu's Service - Debuginfod official documentation,
link: https://ubuntu.com/server/docs/service-debuginfod
...
23
votes
7
answers
72k
views
How can I install "gdb-arm-none-eabi" on Ubuntu 18.04 (Bionic Beaver)?
In previous versions of Ubuntu, GDB for ARM Cortex processors was part of the package gdb-arm-none-eabi. Searching https://packages.ubuntu.com/ for gdb-arm-none-eabi for Ubuntu 18.04 doesn't return ...
0
votes
0
answers
195
views
gdb-multiarch cannot recognize my arm binary file
I want to use gdb-multiarch to remote debug arm code running in qemu. Below is my mk script:
ARM=arm-none-eabi
QEMU=qemu-system-arm
$ARM-as -o ts.o ts.s -g
$ARM-ld -T t.ld -o t.elf ts.o
$ARM-nm t.elf
...
1
vote
1
answer
95
views
Has the apache2-dbg package been dropped from Ubuntu 22.04?
Has the apache2-dbg package been dropped from Ubuntu 22.04? If so, is there any replacement?
3
votes
3
answers
9k
views
debugging in codelite - "GDB: Failed to set controlling terminal: Operation not permitted"
while debugging in codelite this error appears in the terminal :
could anyone help me solving this problem?
1
vote
0
answers
808
views
gdb Installation Error -- libc6-dev
UPDATE: I have re-installed (3 times) Ubuntu, and performed sudo apt policy libc6 libc6-dev with this output:
libc6:
Installed: 2.35-0ubuntu3.1
Candidate: 2.35-0ubuntu3.1
Version table:
*** 2....
0
votes
1
answer
3k
views
22.04 gnome-control-center GLib segmentation fault
Since updating to 22.04, the settings menu segfaults every time I try to start it. I see some other threads with this issue - one who stopped using ubuntu as a solution, and the other answers did not ...
0
votes
0
answers
62
views
GDB in DDD produces a return character when I attempt to lookup value of variable
I've been trying to look up a value using gdb in ddd, in a .asm file as I am programming x86 assembly but when I type (into gdb) x/uw &min in the gdb shell, I just get a return character that ...
14
votes
4
answers
21k
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 (http://docs....
-1
votes
1
answer
2k
views
How to fix the X Window System error coming when running a c++ GTK program
I am getting an error while running a program written in c++ in GTK. The program stops when this error appear. I am a beginner and i have no idea what to do for this. The error is as follows.
(main:...
9
votes
1
answer
2k
views
How to update glibc on ubuntu 20.04 due to security vulnerability
I am trying to update glibc 2.31-0ubuntu9.2. As an internal scan has picked this up as vulnerable.
https://nvd.nist.gov/vuln/detail/CVE-2021-33574#range-6777140
When I use sudo apt-get update then ...
2
votes
2
answers
5k
views
How to output web page html source code into a file
My goal is to output an html source into a file, I'm using w3m to browse the web from terminal.
When using the following command on terminal: w3m <url> -dump the program displays the web site ...
1
vote
0
answers
1k
views
GDBus.Error:org.freedesktop.PolicyKit1Error.Failed: Unix process subject does not have uid set. Virtualbox
Hello ubuntu Community,
i have a Problem to open the root Folder or an application.
I use Ubunutu with the Virtualbox. I would be happy if someone could help me.Error
0
votes
0
answers
615
views
gdb/gdb multiarch does not work on my ubuntu
currently I'm running xv6 on qemu on Ubuntu machine, the version is buster/sid
On one terminal I start qemu like this, seems ok
~/xv6-labs-2020# make qemu-gdb
*** Now run 'gdb' in another window.
qemu-...
0
votes
0
answers
363
views
Qt5 installer does not find debugger
I installed Qt5.15.2 with the online community-version installer on Ubuntu 20.04. In QtCreator I find the compilers but not the debugger. On my system I also have GDB:
$apt policy gdb
gdb:
Installed:...
0
votes
1
answer
264
views
How does a newer version of a package disappear from apt-get install?
I have two Ubuntu 18.04 servers at my office that are for development work, and we have the GNU Debugger installed. All of these packages are always installed using the "sudo apt install" ...
2
votes
2
answers
12k
views
Cannot compile GDB7.8 with Python support
I am trying to install GDB7.8 with Python support. From the source folder, I am running ./configure --with-python
When I did tab-complete from --with- I did not see Python in the list.
But when I ran ...
0
votes
1
answer
83
views
Is "Ubuntu Desktop for Developers" different from "Ubuntu Desktop"?
Is "Ubuntu Desktop for Developers" different from "Ubuntu Desktop"? If so, how do I download the Developers' version. I want to make sure that I get things like gcc, g++, gdb, ...
3
votes
1
answer
3k
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 ...
2
votes
0
answers
269
views
Two different core files generated at different occasions of application crash
I wanted my C++ application to produce core dumps when it crashed, so I followed this advice:
https://stackoverflow.com/questions/2065912/core-dumped-but-core-file-is-not-in-the-current-directory
...
0
votes
0
answers
545
views
Prompt is marching across the screen when entering gdb TUI
I'm debugging a program:
// t.c
#include <assert.h>
int main() {
assert(0);
return 0;
}
gcc t.c -g
gdb ./a.out
(gdb) r
Starting program: /home/user/a.out
a.out: t.c:4: main: Assertion ...
0
votes
1
answer
3k
views
what is the difference between gdb and gdb-peda?
I have tried to search on google but still could not find anything that i understand.
Can anyone tell me the difference between them?
And which one is better to debug c++?
5
votes
4
answers
27k
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 this ...
0
votes
3
answers
3k
views
Cannot install GDB on Ubuntu 17.10 due to Python dependency issues
I had to uninstall GDB just to upgrade to 17.10, but now I can't get it installed again.
sudo apt install gdb
Reading package lists... Done
Building dependency tree
Reading state information......
0
votes
3
answers
3k
views
gdb-qemu : can't put break point on kernel function ( kernel 4.10.0-35)
I am trying to debug the Ubuntu kernel using KDB + qemu. However, I am not able to debug it. Following is the error I am getting. Can someone help?
Starting QEMU:
sudo qemu-system-x86_64 -enable-...
1
vote
0
answers
27
views
.coredumpctl pid weird alignment
While starting my first use of coredumpctl, I have noticed a repeated occurrence of a bug. I have created a small snippet which contains a stack BOF vulnerability (compiled with no stack protection). ...
0
votes
0
answers
361
views
gdb on Ubuntu 19.10 showing wrong variable values
Since upgrading to Ubuntu 19.10, gdb (8.3) is nearly unusable using programs compiled using the default gcc (9.2.1) using -O0 -ggdb -g3 because most displayed values for variables are wrong.
The ...
11
votes
1
answer
3k
views
False "application not responding" box is creating havoc with GDB
I'm trying to debug a C++ application using GDB and the Qt Creator IDE. Every time the debugger stops on a breakpoint, Ubuntu (v 17.10) thinks the application is frozen and issues the dialog box with ...
1
vote
1
answer
770
views
Ubuntu 19.10 gdb nearly unusable long delay
I am having a problem with the gnu debugger on Ubuntu 19.10. The problem presents itself as a long delay, somewhere between 20-30 seconds between running my program with gdb and my program actually ...
4
votes
2
answers
12k
views
Core file not generated in Ubuntu 18.04
I was trying to generate a core file in Ubuntu 18.04. My program generates a core file, but I'm not able to find it.
$ ./a.out
Segmentation fault (core dumped)
$ ls -lrt
total 32
-rwxrwxrwx 1 sanjay ...
2
votes
1
answer
2k
views
Stop or disable keyboard/mouse/input grab from shell
I am trying to debug a full-screen application which uses OIS for input.
The program grabs control of mouse and keyboard.
When I hit a breakpoint (i'm using gdb), I cannot continue, step, or do ...
1
vote
0
answers
2k
views
gdb error for keepassx/keepassxc: "Cannot find user-level thread for LWP" "generic error"
I tried to run gdb on keepassxc, but encountered an unfamiliar error:
$ gdb /usr/bin/keepassxc
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
...
0
votes
1
answer
84
views
Is there an Ubuntu developer installation which comes with full C/C++ development envirenment installed?
I do not want to download source code for gnu gcc/g++/gdb/make... and compile from scratch. I am OK with downloading a built and ready to use set of packages. But best of all, I am looking for an ...
3
votes
0
answers
336
views
Manually compile and install debugging symbols for the recoll package?
I've got some crash files for recoll
from which I would like to extract a symbolic stack trace.
Unfortunately,
there are no debug symbols
available for this package,
so my stack traces are mostly ...
1
vote
0
answers
4k
views
How to solve warnings from GDB?
I need help about debugging GIMP 2.10.10
O.S. Ubuntu 18.04.2 LTS
GDB Version (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
I get this message from GDB when i try to generate a backtrace inside flatpak ...
0
votes
1
answer
1k
views
TrueStudio "Could not determine GDB version command" error
I am working with TrueStudio. I face with this error when click Debug button. https://i.stack.imgur.com/AhN6q.jpg How can I fix this problem? Before this in the build step I saw another warning as ...
1
vote
3
answers
5k
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 ...
10
votes
3
answers
23k
views
Upgrade from gdb 7.7 to 7.8
How to upgrade my GDB debugger from the current version which is 7.7 to the next version which is 7.8, Also I'm working on Ubuntu 14.04.1?
1
vote
2
answers
7k
views
g++ and gdb problem: debug symbols for shared libraries not found
I am porting a large set of applications and libraries from Debian 7 to Ubuntu 16.04. This is a GNU autotools project, so libtool is involved. gdb cannot find the symbols for the majority of the ...
1
vote
1
answer
2k
views
netbeans missing native build tools
My Goal
I want to have a fully functioning NetBeans C/C++ on my ubuntu 18.04
A small background
The first problem I've encountered was
build host not connected
after a little research I've ...
4
votes
1
answer
18k
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
1
answer
2k
views
openjdk-7 gdb list error: "main.c: No such file or directory"
I'm currently struggling with debugging openjdk in Trusty Tahr. I already installed opejdk-7-jdk and openjdk-7-dbg. When I issue gdb java I see it reads the symbols properly, but when I ask to list ...
3
votes
2
answers
3k
views
How can I set up an automatic core dump in an Upstart script?
myapp is an application that crashes eventually. I would like to get the core dump of those crashes...
This is the upstart script I have written to achieve this. It doesn't work yet.
description "...
2
votes
0
answers
1k
views
Upgrade to python 2.7.15 (for gdb 8) on Ubuntu 16.04
I am running Ubuntu 16.04 with gdb version 7.11.1-0ubuntu1~16.5. When I upgraded g++ to g++-6.4 (Ubuntu 6.4.0-17ubuntu1~16.04), gdb started giving python errors like:
Python Exception <class '...
4
votes
0
answers
1k
views
How to set up debugger for ARM Assembly using qemu and gdb
I followed this tutorial as well as this one to set up a compiler + debugger for ARM Assembly.
Following the first one, I ran the command qemu-arm -singlestep -g 1234 emptyand started a new shell, ...
5
votes
2
answers
7k
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 "/usr/lib/...
6
votes
1
answer
43k
views
how to install gdb and valgrind in ubuntu
If I type gdb on my terminal prompt, gdb opens up , but when I run commands like next, weird stuff shows up like:
_libc_start_main (main=0x40060d <main>, argc=1, argv=0x7fffffffdfc8, init=<...
24
votes
5
answers
84k
views
warning: GDB: Failed to set controlling terminal: Operation not permitted [duplicate]
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
What ...