Skip to main content
Filter by
Sorted by
Tagged with
2 votes
0 answers
202 views

Background I'm running an x86/amd64 Debian 11 environment inside Docker on my MacBook Air with an M1 chip (Apple Silicon). I want to use gdb to debug programs compiled for amd64, but I've encountered ...
billwang's user avatar
0 votes
1 answer
83 views

I'm trying to debug some embedded c code, I can connect the debugger and debug the target but when switching to the tui mode some keys stop working. When running gdb in tui mode, either via gdb -tui ...
Tarick Welling's user avatar
0 votes
0 answers
78 views

I'm trying to implement my own debugger, and I've implemented a way of parsing DWARF4 information contained in the executable.When printing out the line entry table generated by the Line Number ...
franzageek's user avatar
-3 votes
2 answers
135 views

I have a simple C program: #include <stdint.h> #define WHEELS_PWM_CYCLES_PER_MS (5) #define WHEELS_TIME_TO_GO_1_CM_MS (10) int main(void) { for (;;) { uint32_t x = (uint32_t)...
user avatar
1 vote
0 answers
104 views

I'm trying to learn more about memory and trying to dissect a stack frame. For reference here is the source code that I'm running through gdb. #include <stdio.h> void test_function(int a, int b,...
0xChris's user avatar
  • 21
3 votes
1 answer
208 views

I'm currently running wsl2 ubuntu 24.04. I want to view the definition of the printf() function in GDB ( gdb ./main). But when I type the step command into printf(). It show this: enter image ...
Mak Sriraksa's user avatar
0 votes
0 answers
53 views

I am in the process of debugging a C++ program. I want to log all times the program goes through a specific breakpoint and capture the stack alongside some variable values. This happens multiple times,...
just_a_noob's user avatar
2 votes
0 answers
89 views

I am using pwndbg, with tmux and splitmind. I have the layout the way I want, the only think I am trying to change is getting the stack pane to be inverted. Like what you would see when running 'stack ...
Jack Whitleigh's user avatar
5 votes
1 answer
170 views

I have been writing a dynamic program loader in C. More specifically, I am writing a chain loader which runs some code before loading in the normal dynamic loader (ld.so). This allows me to run some ...
user30289366's user avatar
6 votes
1 answer
173 views

I am working on a c program to add conditional breakpoints or print some values. But when I use some expressions, the gdb failed with Invalid cast. OS: Ubuntu 24.04.1 LTS GCC: gcc (Ubuntu 13.3.0-...
XuanCheng's user avatar
1 vote
0 answers
167 views

I'm trying to build a production code and still have a minimum debugging capability, specially, in case of a processor trap. Critical information for me is to find the back trace causing the crash. I'...
Nima's user avatar
  • 33
0 votes
1 answer
139 views

I want to run GDB with a Python script that also drives the debug target's input, say through a pipe. I cannot seem to get the ordering of the target execution and pipe setup lined up to avoid ...
r4dr3fr4d's user avatar
0 votes
0 answers
34 views

Here is my program: #include <stdio.h> int main() { int counter = 0; int run = 1; while (run) { printf("loop %d\n", counter++); } return 0; } I ...
Louis Coulet's user avatar
  • 4,731
3 votes
0 answers
142 views

I'm trying to debug a C++ program in VS Code using GDB. GDB works fine from the command line, but when I attempt to launch the debugger in VS Code, I encounter a strange error. I'm running an x86_64 ...
Pietro's user avatar
  • 31
1 vote
3 answers
631 views

I'm trying to debug a fortran90 application, using vscode with gdb. In one particular function: subroutine get_hamiltonian(...) real :: list(:) ... end subroutine get_hamiltonian I can not ...
tornikeo's user avatar
  • 982
0 votes
1 answer
154 views

It's a follow up question of In a release build by GCC, i.e., without -g flag, is register info trustable?, thanks for the answer of it, I now understand that the registers designated for function ...
PkDrew's user avatar
  • 2,281
3 votes
1 answer
249 views

Given a Rust Vector (potentially, a long one), I would like output a single element while debugging my program. Although indexing the vector directly is desirable, I would also appreciate an approach, ...
Alexandre Aksenov's user avatar
0 votes
0 answers
59 views

Since gdb has only one global set print elements that affects all array-like types, it has been necessary to use a very short value like set print elements 4. But in certain specific cases it can be ...
Byron Hawkins's user avatar
3 votes
0 answers
105 views

Hey does anyone have a fix for the VSCode gdb debugger running inside of the IDE at some point won't observe breakpoints and the red dots turn to little grey circles. It might be good information that ...
kinglouie's user avatar
0 votes
1 answer
110 views

Sorry if this is the wrong format. Im currently doing a CTF and have a problem where i have to overflow a buffer, to get access to a /bin/sh hidden function, where i then can get a flag. I think i ...
Egelund48's user avatar
0 votes
1 answer
42 views

Say I have a session like this in gdb: 320 mystruct.ticks++; (gdb) n 321 mystruct.prev_state = mystruct.state; (gdb) n 325 if( mystruct.variant == VARIANT_ONE ) (gdb) n 335 if( mystruct....
sdbbs's user avatar
  • 5,948
1 vote
0 answers
50 views

Im working currently on a sideproject that centers around building a kind of "diy debugger" for an embedded controller im working with. I can not attach debugger directly to it, but im able ...
Xeroe's user avatar
  • 19
1 vote
0 answers
118 views

I just hate it so much when small things that were working since forever suddenly break. I use MINGW64 bash in Windows Terminal in Windows 10. When I run gdb-multiarch, inside it, suddenly Backspace ...
sdbbs's user avatar
  • 5,948
0 votes
1 answer
66 views

Is there a way to know the last hit break point number in GDB debugging C code. The info break/breakpoints command list all the available breakpoints but does not displays the break point at which the ...
vka's user avatar
  • 1
1 vote
1 answer
63 views

I'm trying to capture when a child executes an abort. The following is a MCVE that should give an idea of what I'm trying to do. #include <iostream> #include <cstdio> #include <iomanip&...
SailorCire's user avatar