Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gdb]

The tag has no usage guidance.

0
votes
0answers
7 views

Unable to use Data Breakpoints

I'm trying to remote debug a UI application in QT running on a Yocto based embedded Linux device. My program seems to segfault when interacting with certain UI elements. I've narrowed the problem down ...
0
votes
0answers
7 views

Unable to debug on Netbeans Mac

I tried installing gdb using homebrew on macos for netbeans several times and end up with this error:" Unable to find Mach task port for process-id 2459: (os/kern) failure (0x5).\n (please check gdb ...
0
votes
1answer
11 views

What format crash utility's disassembler uses to output assembly instructions?

Crash utility can disassemble kernel functions. but what format it uses? Which is first, source or destination? inst src, dist or inst dist, src This is what I am asking about: crash> dis ...
0
votes
0answers
24 views

New gcc vs. older valgrind

I'm working on a RHEL6 system with a software project, that requires C++11. This requirement forces me forgo the base compiler included with the OS (gcc-4.4.7) and use a manually-built one (gcc-8.2.0)....
-1
votes
1answer
145 views

What to install with Qt Creator?

I'm trying to install Qt creator on Windows but it has so many options (and the whole installation requires many GB) that I really don't know which ones I need. I only want to be able to create and ...
0
votes
1answer
129 views

What is batch mode execution in GDB?

I read a comment like - "Runs gdb in batch mode". So wanted to understand what does batch mode execution mean for GDB? And what is the other mode of execution for GDB?
1
vote
1answer
35 views

what to do when vs-code remote C++ debugging asks to set gnutarget format-name

I am on to debugging remote C++ program running on raspberry pi on ubuntu. I have followed https://medium.com/@spe_/debugging-c-c-programs-remotely-using-visual-studio-code-and-gdbserver-559d3434fb78. ...
1
vote
0answers
222 views

MinGW: Python enabled GDB on Windows

I use QtCreator 4.6.2, which apparently requires Python-enabled GDB if I want to use it as a debugger. I tried to install mingw32-gdb-python version 7.5-1 with MinGW installer (graphical interface), ...
0
votes
0answers
265 views

Unable to select “gdb/gdbserver” in BuildRoot configuration

BuiltRoot is a tool to build embedded linux images. I want to enable gdb/gdbserver in target system, but fail to select "gdb/gdbserver" in Configuration > Target packages > Debugging, profiling ...
0
votes
1answer
560 views

How do I uninstall pwndbg?

Not much explaining to do, except I Googled how to and couldn't find anything relating to the uninstall process. I am on a Debian 9 system. If I recall correctly I installed it using: git clone ...
3
votes
0answers
176 views

GDB 7.6 TUI does not refresh the display, creating artifacts

I'm using GDB 7.6 on a remote server. When I start gdb, everything is fine, as long as the program to debug is not run. I can use up and down arrows to navigate through GDB history, etc. No display ...
0
votes
0answers
56 views

Capcure all memory addresses referred by process

I want to capture all memory addresses referenced by my process on Ubuntu. Is gdb helpful to do this, or are there other tools? Thanks!
0
votes
1answer
2k views

gdb binary and where to find it?

I'm following the instruction here to install gdb on my MacOS Sierra. In section "2.1.3. Code-sign the gdb binary", I'm supposed to "specify the full path to the gdb binary" but I don't know what it ...
2
votes
1answer
1k views

How to install specific gdb (or other) package version using apt-cyg in Cygwin?

I am trying to install fresh version of gdb debugger on my cygwin (version that comes with cygwin is buggy). Since I need the newest version of gdb, I need to use apt-cyg to install it. When I run ...
0
votes
2answers
2k views

Cannot see variables in gdb

I'm new to cygwin (and *nix for that matter) and don't understand the following gdb behavior. I've created an executable that intentionally results in a SIGSEGV: #include <iostream> void Func(...
0
votes
1answer
433 views

Arrow keys in GDB (window mode) not working with TERM=xterm

First, this is not the history size problem. (gdb) show history size The size of the command history is 70000000. Second, it happens in xterm and not in vt100 and I don't want vt100 because of weird ...
2
votes
1answer
2k views

How to equivalent to ps -ef in Windows 10

I have looked online, and have not found anything that would accomplish what I want to do. I am looking for a command with output equivalent to "ps -ef" of Linux so I can find out the process id ...
5
votes
1answer
21k views

Closing open file without killing the process

I have java(yeah java...) application running on CentOS 7. After a while, there are many "deleted" files that bother me. for deleted files used(not the issue): lsof | grep "(deleted)" I found them ...
2
votes
1answer
160 views

coredumps 'can only dump core to fully qualified path!'

I have a question about generating a coredumps under Debian. First, I enable the feature trough this command : ulimit -c unlimited Next I create a Segmentation fault but I have this error : [...
0
votes
1answer
179 views

How to enter into process running on gdb?

So I was trying to debug a program that runs on two node. I use yod as task launcher. yod -hosts node01,node02 ./dist_task -nl 2 The program is stuck. So I wanted to use the gdb like this yod -...
1
vote
1answer
293 views

$HOME is not defined for root user on Ubuntu 14.04

On a fresh Ubuntu 14.04 install, the bash environment for the root user does not have $HOME defined. I need to run some apps from a root shell, for example: gdb /usr/sbin/apache2 This is difficult ...
2
votes
0answers
264 views

Emacs, gdb: How do direct program output to gdb buffer in gdb 2 window mode

Is there a way to tell Emacs 24.3.1 with gdb 7.5 to display the program output in the gdb buffer instead of a separate "** input/output **" buffer? (Displaying it in a separate buffer in 2 window ...
0
votes
1answer
2k views

Intalling gdb and pstack on Amazon Linux AMI

I tried installing gdb and pstack on EC2 Instance with Amazon Linux AMI (it was not installed by default), and it's not working. Tried: [ec2-user@ip-172-21-ab-xyz ~]$ sudo yum install gdb Loaded ...
0
votes
1answer
1k views

Homebrew install gdb, symlink error with binutils

I'm trying to install GDB via Homebrew on OSX Mavericks via the command brew install homebrew/dupes/gdb. This error message pops up during install: gdb requires special privileges to access Mach ...
2
votes
1answer
215 views

Dtrace shows posix_spawn called with only 3 argument. Trying to launch by hand

I ran dtruss on a process that launches another one: the League of Legends Launcher starts the main game process with certain arguments that I can't seem to pass via the command line. What caught my ...
6
votes
2answers
4k views

Software: Launching League of Legends spectator mode from Command Line (Mac)

Background: tl;dr at the end League of Legends has a spectator mode, in which you can watch someone else's game (essentially a replay) with a 3 minute delay. Popular LoL website OP.GG has figured ...
1
vote
0answers
734 views

Debugging linux kernel, SIGKILL

Trying to debug linux kernel (vmlinux) with gdb during my education, but after I run kernel I just got "program terminated with SIGKILL": gdb vmlinux-3.11.0-12-generic ...GDB header... Reading ...
0
votes
1answer
4k views

How to install gdb on Arch Linux

How do I install the GNU Debugger (gdb) on Arch Linux? I've checked that I don't already have gdb installed by running this command: gdb -help I've tried this: sudo apt-get install gdb but it's ...
1
vote
1answer
850 views

Debug info package for centos

Hi I am getting the following on each line of gdb instruction steps. Does anyone know what package I need to install to remove this message from a CentOS build? Missing separate debuginfos, use: ...
2
votes
0answers
52 views

Old gdb cannot find out how to do logging

I'm running an obsolete Red Hat OS and debugging with the built-in gdb but I cannot figure out how to do logging. I've tried: set logging on But get: No symbol "logging" in current context It ...
2
votes
0answers
548 views

Where is the console ST2/GDB

I'm using sublime text 2. I got GDB to work but I don't see a console window anywhere. I see the GDB console but nothing that outputs text from my C++ program. How do I use GDB and see my the console ...
1
vote
4answers
28k views

How to know if gdb is installed?

How can i know if gdb is installed in a unix machine? I run the following commands: > gdb > gdb main and the result is gdb: command not found but i don't if this means that gdb is not ...
2
votes
1answer
182 views

Can I remotely monitor printf results of a C program?

I have a long running C program in which I've started from the Terminal.app using: gdb program_name gdb run I'm using many printf statements to monitor the progress of the program. Unfortunately, ...
0
votes
1answer
839 views

Why gdb is bind to fixed version of autoconf?

Edit 1: I am trying to build gdb from source. Why can't I use autoconf 2.65 instead of 2.64? It is confusing:( /var/lib/gforge/chroot/home/users/mirror/ins/ins-autoconf/bin/autoreconf -iv ...
9
votes
3answers
21k views

Why can't I find termcap library when I build gdb?

make and then failed with: configure: error: no termcap library found, but that termcap lib is just there, why can't make find it? checking for library containing zlibVersion... -lz checking zlib.h ...
1
vote
1answer
144 views

MacPorts, how to run “post-destroot” script

I'm trying to install MacPorts gdb; it seems to be poorly supported… Running "port install" installs it to /opt/local/libexec/gnubin/gdb, but the intent doesn't seem to be to add that to $PATH. The ...
1
vote
1answer
1k views

how to override truncation in gdb

When I print in gdb by running: p cmd.c_str() the result is truncated to 200 characters. is there a way that I can set the default truncation to something higher like 1000 characters?
0
votes
1answer
136 views

Valgrind cannot attach on OSX Lion

When I run valgrind with the options --tool=memcheck --db-attach=yes and then try to attach when an error pops up i get: valgrind: m_debugger.c:235 (ptrace_setregs): Assertion 'Unimplemented ...
2
votes
1answer
2k views

GDB debugging tool for linux

I'm executing a pro*c executable in linux and I've got segmentation fault error. But there is no core file dumped. Thus, I want to debug the program using GDB debugging tool. However, I see that it ...
1
vote
0answers
182 views

XCode to debug gdb-debuggable executable

I have compiled a cmake-based executable that is (miraculously) debuggable in gdb. So examining hundreds of variables with the terminal becomes a little bit slow for very large projects and I would ...
1
vote
2answers
2k views

Create a core dump when running a program with sudo?

Cores apparently are not dumped when the using sudo despite ulimit -c being set to unlimited. Is there any way around this?
8
votes
3answers
6k views

In GDB, how can I jump directly up to the topmost call stack frame?

I have a C program that seg faults after descending deep into an infinite recursive mess. Backtracing the process in GDB is useless because the call stack frame is at least 1000 frames deep, and the ...
0
votes
0answers
1k views

How can I run GDB without root permissions on a Mac?

When I start GDB from the command line I have no problems. But when I start debugging a program from NetBeans (C++), I get this message: "Type the name and password of a user in the "Developer Tools" ...
3
votes
4answers
6k views

How to change the default directory in emacs?

When I'm using M-x gdb when lots of source files are open in emacs, the default directory in emacs is often different with the directory of my working copy to run that file i want to run. It's ...
16
votes
2answers
12k views

How to turn off GDB TUI?

I have this GDB TUI/layout on. How to return to default GDB view? I can't just restart GDB because I have important backtrace on my hand and as long as I have these extra windows I can't scroll well ...
3
votes
1answer
1k views

How to tell emacs gdb to show current code line in the center of buffer?

Using the debugger in emacs is nice: You can step through the code with the next command, and emacs will always show the code line that is currently executed, like this: int x; int y; =>int z; ...
9
votes
5answers
13k views

How to dump memory to a file in gdb (osx)? Need to rescue my work

I need to know how I can dump memory in Safari.app, to a file. I've entered gdb attach 6741 (my safari PID). Now what? I tried searching for help on gdb on google, but I couldn't find anything that ...
6
votes
5answers
5k views

sending one key stroke to two windows (Ubuntu)

I'm running Ubuntu Linux. I have two open Terminal windows running side by side. I'm looking to be able to hit the enter key once, and have that key stroke sent to both windows. (What I'm doing is ...
1
vote
2answers
2k views

GDB breakpoint problems attaching to QEMU

I have the following problem: When I connect gdb to qemu for debugging, it won't break on breakpoints. I can set breakpoints, break with ctrl+c etc. Any clues how this can be fixed? I have: $ qemu -...