Questions tagged [cgdb]

cgdb is a lightweight curses (terminal-based) interface to the GNU Debugger (GDB). In addition to the standard gdb console, cgdb provides a split screen view that displays the source code as it executes. The keyboard interface is modeled after vim, so vim users should feel at home using cgdb.

37 questions
2
votes
1 answer

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 running it in cgdb the result…
Tyilo
  • 28,998
  • 40
  • 113
  • 198
1
vote
0 answers

run c program with cgdb and blocked at getchar()

My test.c file: #include int main() { int myChar; myChar = getchar(); printf("You entered: %c\n", myChar); return 0; } compiled and run with cgdb: $ gcc -g test.c $ cgdb a.out I input start, then input n, and I…
Aqiu
  • 49
  • 3
1
vote
0 answers

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 Ubuntu and have disabled the F10 (menu) and F11…
user2023370
  • 10,488
  • 6
  • 50
  • 83
1
vote
1 answer

Is there a tool like CGDB for LLDB?

I'm looking for a tool like CGDB for LLDB. Make debugging in the terminal easier. Thanks.
zhuxiaoxi
  • 143
  • 8
1
vote
0 answers

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 codesigned - see taskgated(8)) I tried both these guides…
Carpetfizz
  • 8,707
  • 22
  • 85
  • 146
1
vote
1 answer

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 example below) it seems to enter into an infinite loop.…
A.P.
  • 461
  • 2
  • 8
  • 17
1
vote
1 answer

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 program in mac os x mavericks and I wasn't able to…
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
1
vote
3 answers

Installing cgdb on a mac os x

I know that this should probably be very easy, and I have looked into the read me files and other files in cgdb like INSTALL that talk about isntalling cgdb. I was trying to install cgdb and the instructions said: $ ./configure --prefix=/usr/local $…
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
1
vote
1 answer

cgdb doesn't exit: determining why and fixing

After I run a program through cgdb, cgdb won't exit. Typing kill, then quit results in cgdb hanging. If I do not load a file in the debugger, quit works. If I load a file but do not run it, quit works. If I run the file, quit hangs. How do I:…
simont
  • 68,704
  • 18
  • 117
  • 136
0
votes
1 answer

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. Recently I discovered cgdb and I very much like it.…
Ynv
  • 1,824
  • 3
  • 20
  • 29
0
votes
1 answer

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": "cppdbg", "request": "launch", "program": "${workspaceFolder}/main", "args":…
denisssj
  • 79
  • 5
0
votes
0 answers

cgdb: how to turn disassembly on and off dynamically?

If I want to see assembly level in cgdb, I can add the following line to the .cgdbrc file: :set disasm It works, but then assembler is always interspersed with C++ code. When I try to type these commands into the command line, they don't work. (Why…
Dov
  • 8,000
  • 8
  • 46
  • 75
0
votes
1 answer

htobe64 function disables debugger's ability to list source code

I have compiled the very simple program $ cat main.cpp #include int main() { uint64_t val=1; // val = htobe64(val); std::cout << val << std::endl; } $ g++ -g main.cpp -o a.out When I debug it using cgdb I get the following: $…
phinz
  • 1,225
  • 10
  • 21
0
votes
0 answers

cgdb produces noise output symbols to terminal

cgdb prints these symbols in terminal: [32m [m. It is the "gdb" part of the program that does that. The "cgdb" part(or window, you name it), prints to terminal in colors. I had installed cgdb from the Linux Mint packages repository and…
user14063792468
  • 839
  • 12
  • 28
0
votes
0 answers

Confusing prompts from cgdb "Start it from the beginning?"

Running a multi-threaded app in cgdb (with gdb defaults in terms of scheduler-locking (off), non-stop (off), etc), and I'm getting these bizarre "unprompted" prompts, like so: [New Thread 0x7ffff0bfb700 (LWP 16513)] …
zzxyz
  • 2,953
  • 1
  • 16
  • 31