Category "gdb"

How can I put a prefix on every information outputed from GDB?

I would like to put a prefix, like "GDB> ", on every output from gdb to distinguish it from the output of my program. Is that possible? An example: test.c #i

How does a debugger identify a thread?

When using a debugger to debug a mutli-thread application, the debugger usually shows the currently running threads. Either with some GUI or command like info t

Can I add a watch to a COMMON block?

I have a very large, very old, very byzantine, very undocumented set of Fortran code that I am trying to troubleshoot. It is giving me divide-by-zero problems

How to check the Cortex-M4 VTOR register with gdb command?

(I am learning about ARM debugging so this may be a dumb question.) I checked the ARMv7-M Arch Ref Manual. It says the reset vector offset is stored in the VTOR

Why is cuda-gdb much slower than gdb in executing the same program without breakpoints in CUDA kernels?

I am having trouble using cuda-gdb. My program starts from python and it loads a shared library containing tensorflow and cuda code. The command I used to start

gdb-mutiarch can't connect JLinkGDBServer on Cortex-A55

JLinkExe can connect to cortex-a55.Cortex-A55 identified.connect to device.png After device connected,"Regs" command seems to work fine."Regs" works fine.png "M

Why does calling lua_newuserdata result in SIGSEGV Segmentation Fault?

I'm trying to identify why a call to lua_newuserdata result in SIGSEGV. The gdb backtrace is : Thread 2 "main.o" received signal SIGSEGV, Segmentation fault. [S

gdb <error reading variable> for any string object

Lets take this very simple program here for example: // test.cpp #include <string> #include <iostream> using namespace std; int main() { strin

GDB in Visual Studio Code Debugging bar disabled

I am trying to debug Assembly x86 in Visual Studio Code but all the stepping buttons are disabled I am using this extension https://marketplace.visualstudio.com

Find place that causes segmentation fault without IDE

I'm studying one project in C++. It's quite big, build is created with cmake. After installing all dependencies and libs it's the build is done fine. But when I

Disable gdb highlight colors

I'm using gdb on Fedora 32 and gdb prints information with highlight color. However the color has less contrast for example dark blue text on black background.

How to set a breakpoint in gdb for an anonymous namespace?

In my code base, there are some callbacks functions which are defined in anonymous namespace. I am debugging in gdb and I want to set breakpoint in the function

why Ctrl-c in gdb terminal dose not send STOP signal to gdb process

To break loop in gdb we need to Ctrl -c in gdb terminal , but some time Ctrl-c not working, is there a way to break the loop? ( excepted sending SIGSTOP or S

Starting the debuggee failed: No executable specified, use `target exec'

Code: #include <stdio.h> #include <stdlib.h> #include <conio.h> // to generate numbers void gen_data(int b[], int n) { int i; for (i =

log file that contains the execution flow of a C or C++ program

I need to generate a log file that contains the execution flow of a C or C++ program. This log file should contain each line of the program (with line number sp

Qt Creator GDB "Additional Startup Command" , "Additional Attach Command" what is the syntax?

Having troubles settings solib-search-path in Options->Debugger->GDB-> "Additional Startup Command" , "Additional Attach Command" looks like if I do: "

What does 'inferior' mean in the term 'inferior debugger'?

I didn't really understand the explanation for inferior in the GDB manual, and google doesn't yield anything more helpful. Can anyone explain 'inferior' in sim

How to run gdb on an executable with arguments?

How can I run something like gdb -e path/to/exe -ex 'run --argnamae argvalue'? Let's assume a recent version of gfb, within the past year or two. Gdb runs and

how to view std:unordered_map member in GDB

When trying to access a member of std::unordered_map using [], I get an error: Attempt to take address of value not located in memory. There is a nice gdb

Jump to current line being executed in cgdb

Is it possible to jump to current line being executed in the Source Window of cgdb? It would be great to have a command or a shortcut to do this, especially a