432 questions
Tooling
0
votes
0
replies
18
views
How to tell gdb the default opsize, so it can debug multi cpu mode code (without a weird disassembly output)
Note: This is a repost of a question I asked on RetroComputing, where I was told to move it here.
I've made my own kernel. It has 32-bit pm, 16-bit pm, and 16-bit real mode code. I use Qemu to ...
0
votes
0
answers
29
views
Remote debug program for Linux uses GDBServer
When writing a console program in the C programming language for the Linux (the Linux is installed on the Respberry Pi), you can use remote development and debugging using the Eclipse on the Windows ...
3
votes
0
answers
142
views
VSCode GDB Debugging Fails with CustomAttributeFormatException When Using Rosetta
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 ...
-1
votes
2
answers
993
views
Vscode : I can't use jlink (blocked on "Waiting for GDB connection..." )
I would like to upload/debug a C program for an embended MCU: cortex M0 (infineon XMC1302).
I am using windows 10, vscode and Jlink (V9). It is the first time I try to use those 2 tools together so it ...
0
votes
0
answers
182
views
OpenOCD issue on MacBook using STM32VLDiscovery
I am new to STM32 programming and using STM32VLDiscovery board for my development on MacBook Air M1 running Ventura 13.5
Following this video, I am trying to setup debugging on VS Code using Cortex-...
2
votes
1
answer
290
views
Debugging with LLDB over SSH "error: process exited with status -1 (no such process.)" MacOS
I'm trying to debug an executable, that I manually built with clang, with lldb on MacOS host (ssh'd into) machine, through ssh. However, when I run it I get:
(lldb) error: process exited with status -...
1
vote
1
answer
204
views
Slow breakpoint triggering with GDB and LinkServer/MCULink
I'm working on a project involving the NXP i.MX RT1060, and I'm using NXP's MCULink for debugging. I use NXP's LinkServer for running a GDB server, and the Cortex-Debug extension in VSCode for GDB. ...
0
votes
0
answers
806
views
Issues Connecting Ghidra to GDBServer on Windows
all buttons non active
I'm trying to set up remote debugging for my application on Windows using Ghidra and GDBServer.
trying_connect_to_gdb
GDB successfully connects to GDBServer. However, when I ...
0
votes
0
answers
184
views
gdbserver not passing all environment variables to debugged process
Looking at /proc/pid/environ for both gdbserver and the debugged process I see that not all variables are passed to the debugged process. Some are missing. Is this a bug? Or normal?
The debugged ...
4
votes
1
answer
3k
views
Attaching a debugger to a container/instance running on a K8s Pod?
From VS Code on my local machine I am trying to attach a debugger to a remote process running in a container/Pod, or attach to a gdb/gdbserver attached to a process running in a container/Pod.
The ...
0
votes
0
answers
128
views
gdbserver and ymm0h register
Does anyone know what on earth is a ymm0h register in the context of gdbserver (see: https://sourceware.org/gdb/current/onlinedocs/gdb.html/i386-Features.html)? I know what ymm0 is but what is this 'h'...
0
votes
1
answer
474
views
Remote Debugging a shared Library (SO File) with GDB using PID
I have a windows PC that is connected to a Linux server in LAN. The Windows is running Windows 10 64 bit while the Linux is Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64) CPU: Intel(R) Xeon(R) ...
3
votes
0
answers
694
views
How to debug the linux kernel on the real machine using gdb?
I have a HP Pavilion 15 laptop with Ubuntu 22.04.3 LTS installed. I was using 6.2.0-39-generic kernel version. I compiled the 6.7.0-rc8-next-20240103 kernel version from source after creating a new ...
0
votes
1
answer
853
views
Strange behaviour in gdb with gdbserver
I'm doing the Protostar exploit-exercices challenge and thought about using gdbserver to remote debug the code. However I keep having a segfault when connecting to gdbserver. To be honest, I'm just ...
1
vote
1
answer
277
views
GDB tracing: Target returns error code '01' after continue command
I am trying to obtain GDB traces as described in this other question.
For completeness, on one terminal I am running:
$ gdbserver :1234 ./a.out
Process ./a.out created; pid = 13610
Listening on port ...
0
votes
1
answer
223
views
Where does GDB store its general register layout?
I'm building my own GDB Server instance based on the Remote Protocol.
One command sent by GDB is 'g', which reads general registers. The layout of the response to this command is architecture specific ...
2
votes
0
answers
371
views
How to load a file into target RAM during an STM32CubeIDE debug session
My environment is STM32CubeIDE on Windows 10 with a JLink debug pod.
The device being debugged accumulates data over time and stores it to an external RAM. When enough data (about 1 MB) is acquired ...
1
vote
1
answer
274
views
SIGABRT QT debugger
Hi when I try to debug a simple QT Application:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator translator;
const QStringList uiLanguages = QLocale::system()....
3
votes
1
answer
2k
views
Attaching GDB target remote by command-line
How can I specify to GDB that I would like it to connect to a gdbserver, but by command-line, so I don't need to type target remote every time. Is there a way to connect automatically?
1
vote
0
answers
414
views
How to install toolchain and custom GDB in VSCode to debug remote target
I am trying to debug a cross compiled remote target with GDB.
The target OS only has gdbserver so I have to use a custom GDB from my WSL host to remotely attach to it. The target is cross compiled ...
0
votes
1
answer
69
views
Pass the value of a variable as an argument to a command in GDB
I have been trying to pass a value which is stored in a variable called $filename to dump binary memory command in gdb.
This is the snippet I am having trouble with:
set $start = table[0].mem_ptr
set $...
0
votes
0
answers
164
views
Gdbserver: "Port already in use" in Delphi 11 when trying to launch with debugger
I am trying to run an Android app in Delphi 11 with the debugger, but it doesn't work.
When starting with the debugger, the progress dialogue gets stuck at the end. When canceling it, the following ...
1
vote
1
answer
210
views
Call operator new[] using GDB
How can I call to operator new[] with GDB?
For example I want to allocate 0x40 bytes and print the address : operator new[](0x44u));
How can I do that using GDB ?
When I tried p (void*)operator new[](...
1
vote
2
answers
629
views
vgdb: "No such file or directory" shared memory file when running in process network namespace
I'm trying to debug a program using Valgrind and GDB. To run the program in my test suite it has to be run within a network namespace (using ip netns exec <namespace>), as it has to simulate ...
0
votes
1
answer
156
views
Isn't it possible to debug remotely with only forwarding the GDB server port?
I have a debugger connected to a Linux box as follows:
[Debugger] <- usb -> [Machine A] <- tcp -> [Rendezvous server] <- tcp -> [Laptop]
I can start st-util on Machine A, forward ...