Questions tagged [gdb]
66 questions
30
votes
3 answers
how to access windows localhost from wsl2?
I have windows 11 with wsl2(ubuntu) installed on it.
I've setup a gdb listener server on my windows localhost and want to access it from wsl2. but it seems my windows machine and wsl vm are using different network adapters.
>ipconfig
Windows IP…
Mahyar Shokraeian
- 403
- 1
- 4
- 6
24
votes
2 answers
How do I turn off GDB TUI?
I have this GDB TUI/layout on. How do I return to the 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 on the basic view.
user40167
- 697
- 3
- 7
- 13
11
votes
2 answers
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 in /proc/pid/fd/... and my question is how can I…
igor
- 423
- 1
- 11
- 25
11
votes
3 answers
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 repeated function calls are series of four common…
dandrews
- 213
- 1
- 2
- 6
10
votes
5 answers
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 usability... yes
checking zlib.h presence...…
hugemeow
- 2,249
- 7
- 29
- 38
9
votes
5 answers
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 told me what to do, even when searching for "how to…
boytheo
8
votes
1 answer
How to codesign gdb on OS X Mojave?
After installing gdb from homebrew (via $ brew install gdb), I followed these instructions to give gdb permissions to attach to a process.
When I got to the step that runs the command:
$ codesign --entitlements gdb-entitlement.xml -fs gdb-cert…
camercu
- 421
- 4
- 12
7
votes
0 answers
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 bug to report.
When I create a breakpoint somewhere…
hdl
- 179
- 6
6
votes
5 answers
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 stepping through some code on two different systems…
Jenna
6
votes
2 answers
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 out a clever way of hosting these spectator games on…
Alex Popov
- 183
- 1
- 6
3
votes
4 answers
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 always painful to type the correct full path of the…
user2195
3
votes
2 answers
GDB Hangs after “New Thread” on macOS
I have built GDB from source on macOS 12.0 and codesigned it. However, every time I try to debug a program, I get this:
(gdb) b main
Breakpoint 1 at 0x10000324f: file main.cpp, line 50.
(gdb) run
Starting program: /Users/tjcaul/Documents/C++/a.out…
tjcaul
- 263
- 3
- 10
3
votes
2 answers
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;
But unfortunately, if your file is long, that…
dehmann
- 2,243
- 3
- 24
- 26
3
votes
1 answer
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 apt-cyg install gdb=7.12 I get an error message:…
Danijel
- 685
- 11
- 25
2
votes
1 answer
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 :
[107356.139862] level0[5616]: segfault at 61616161 ip…
Toufik Airane
- 21
- 2