38 questions
-2
votes
2
answers
152
views
How can I debug a terminal program (like vim) with gdb/cgdb?
Background
I am modifying the source code of vim and I need to use a debugger.
Problem
Since vim is a terminal program, it takes over the terminal when it starts. So as soon as I start inside gdb, I'm ...
0
votes
2
answers
2k
views
The vscode debugger for gdb is not running as per configuration
I am trying to pass command line arguments to the gdb in vscode. Here is my launch.js config.
{
"configurations": [
{
"name": "(gdb) Launch",
"type": &...
0
votes
1
answer
39
views
htobe64 function disables debugger's ability to list source code
I have compiled the very simple program
$ cat main.cpp
#include <iostream>
int main() {
uint64_t val=1;
// val = htobe64(val);
std::cout << val << std::endl;
}
$ g++ -g ...
0
votes
0
answers
265
views
cgdb produces noise output symbols to terminal
cgdb prints these symbols in terminal: [32m <some string> [m.
It is the "gdb" part of the program that does that. The "cgdb" part(or window, you name it), prints to terminal ...
1
vote
0
answers
293
views
Can I map the SHIFT+F11 Visual Studio debugger shortcut within CGDB?
I'd like to use the same keyboard shortcuts for step-debugging in CGDB that Visual Studio uses by default. The main three for me are step over (F10), step in (F11), and step out (SHIFT+F11). I use ...
1
vote
1
answer
979
views
Is there a tool like CGDB for LLDB? [closed]
I'm looking for a tool like CGDB for LLDB.
Make debugging in the terminal easier.
Thanks.
1
vote
0
answers
90
views
cgdb not working macOS Sierra
I'm trying to run after setting a breakpoint in cgdb
Starting program: /path/to/my/executable
Unable to find Mach task port for process-id 1996: (os/kern) failure (0x5).
(please check gdb is ...
0
votes
0
answers
66
views
cgdb not seeing basic_ios.h header when stepping through source file
When I step into this line in cgdb
if (cfgFile.good()) //Settings:cpp:31
std::cout << "File load succeeded" << std::endl; //Settings:cpp:32
I get this error
(gdb) run
The program ...
0
votes
0
answers
57
views
how to switch to another thread when current thread is hanging up?
I am using gdb, and something like following:
thread_2()
{
// do something
wait_thread_1_to_wake_me_up();
// do something
}
thread_1()
{
// do something
create_thread_2();
//...
1
vote
1
answer
806
views
Cannot enter input in cgdb on Linux Ubuntu 14.04
Here is my very simple program that I am trying to debug with cgdb. Problem is once I get to the "scanf" line, it prompts for an input, but once I press enter after entering the input (2 in the ...
1
vote
2
answers
185
views
Correct place to report outdated homebrew formula
Where should the github issue be placed for an outdated homebrew formuae; homebrew's github, or somewhere on the project maintainers' side?
For a formula I've been trying out, cgdb, it seems that in ...
1
vote
1
answer
878
views
Trying to use gdb (and cgdb) for debugging programs in go (golang) but there seems to be problems
I am aware that the go team will not support GDB very well. However, it seems it works sometimes so before I give up I want to see if it works on this program.
I was trying to use it to debug my ...
1
vote
2
answers
125
views
Is it possible to prevent CGDB from clearing screen on exit?
When I run CGDB I see all of the code/backtraces/stdout stuff just fine. When I exit, it all gets cleared (just like when I exit vim, for instance). As a result I lose all the output.
I realize it ...
2
votes
1
answer
638
views
Make color escape codes work in cgdb
I have the following function residing in ~/.gdbinit:
define foo
echo \033[34m
echo testing...\n
echo \033[0m
end
When running foo in gdb it prints testing... in blue, however, when ...
4
votes
3
answers
485
views
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 after browsing files in the File Dialog ...
18
votes
1
answer
11k
views
How to scroll the gdb window within cgdb?
While using cgdb, how does one scroll through the output visible in the gdb window?
0
votes
1
answer
731
views
Using cgdb for a ncurses c application
When I debug a ncurses appplication I usually do the following:
gdb --tty=/dev/ttys000 ...
This will then make the ncurses application to run in a different terminal than the one gdb runs in.
...
9
votes
3
answers
5k
views
How to make cgdb show assembly code?
I can't find a way for cgdb to disassemble a binary and show the assembly code with the current instruction in the code window. Is this possible and what command should I use? I'm using Mac OS X and ...
5
votes
1
answer
1k
views
gdb log file format
When I use set logging on in gdb, the output to the log file has a different format than what I see on the terminal screen. The logfile is not very readable. How can I get the log file in a readable ...