More debug info for CGDB 0.7.1

246 views
Skip to first unread message

William.Leo

unread,
Nov 27, 2020, 1:15:27 AM11/27/20
to cgdb
hi all

I ported more debug info display form 0.6.8, https://groups.google.com/g/cgdb-users/c/o3MEUoOT2oM, but not totally, the work will go on.

The attachment is a binary of cgdb, can be run on RHEL/CentOS, I tested it only on CentOS 7.

When all features finished, will upload source pack. Since it's still in developing, maybe bug inside, any issue you find or feature you need, mail me.

Thanks
cgdb_0.7.1_by_William

William.Leo

unread,
Dec 1, 2020, 5:10:02 AM12/1/20
to cgdb
New version, fixed some bugs and the feature of display debug info is not less than 0.6.8.

New feature, as follows. 
1. do not like enter pid
cgdb1.jpg
2. more info for debug, local variables, back trace, breakpoint, thread. Support horizontal and vertical mode.
cgdb2.jpg
cgdb3.jpg
3. Switch foucus in windows by hotkey.
4. Hotkey adjust window size 
cgdb6.jpg
5. Highlight debug info. 
cgdb4.jpg
cgdb5.jpg
cgdb_0.7.1_Plus_ea9411e0

William.Leo

unread,
Mar 5, 2021, 4:29:10 AM3/5/21
to cgdb
The newest version sourcecode that I modified in attachment. 
cgdb_plus_0.7.1.tgz

William.Leo

unread,
Nov 16, 2021, 10:40:54 PM11/16/21
to cgdb
fixed display bug for multi-thread info.

[11:14:11 kunkka @ PostgreSQL ~/Working/cgdb_0.7.1_plus]$ git diff cgdb/interface.cpp
diff --git a/cgdb/interface.cpp b/cgdb/interface.cpp
index 0fcc741..3a7c1d1 100644
--- a/cgdb/interface.cpp
+++ b/cgdb/interface.cpp
@@ -2848,7 +2848,7 @@ void tabpanel_update_threads(unsigned count, int cur, struct tgdb_thread *thread
enum hl_group_kind hli = hl_index_number;
enum hl_group_kind hlf = hl_function;
- if (i + 1 == cur) {
+ if (threads[i].idx == cur) {
hli = hl_index_number_actived;
hlf = hl_function_actived;
tab_add_text(tp, TTHREADS, "*", hli);
@@ -2880,7 +2880,7 @@ void tabpanel_update_threads(unsigned count, int cur, struct tgdb_thread *thread
while(strchr(pstr, '/'))
pstr = strchr(pstr, '/') + 1;
}
- sprintf(line, "%s:%d", (pstr ? pstr : ""), threads[i].line);
+ sprintf(line, "%s:%d\n", (pstr ? pstr : ""), threads[i].line);
tab_add_text(tp, TTHREADS, line, hl_file_line);
}
@@ -2936,4 +2936,4 @@ void if_set_breakpoint_disable_hl(enum hl_group_kind hl)
void if_set_file_line_hl(enum hl_group_kind hl)
{
hl_file_line = hl;
-}
\ No newline at end of file
+}
[11:14:32 kunkka @ PostgreSQL ~/Working/cgdb_0.7.1_plus]$
[11:16:28 kunkka @ PostgreSQL ~/Working/cgdb_0.7.1_plus]$
[11:16:28 kunkka @ PostgreSQL ~/Working/cgdb_0.7.1_plus]$ git diff lib/tgdb/gdbwire.c
diff --git a/lib/tgdb/gdbwire.c b/lib/tgdb/gdbwire.c
index d9794fe..30f97c4 100644
--- a/lib/tgdb/gdbwire.c
+++ b/lib/tgdb/gdbwire.c
@@ -3501,7 +3501,7 @@ info_thread(struct gdbwire_mi_result_record *result_record,
threads = (struct gdbwire_mi_thread *)calloc(t_count, sizeof(struct gdbwire_mi_thread));
memset(threads, 0, t_count * sizeof(struct gdbwire_mi_thread));
- for (int i = 0; i < t_count && mi_thread; i++)
+ for (int i = 0; i < t_count && mi_thread; i++, mi_thread = mi_thread->next)
{
GDBWIRE_ASSERT(mi_thread->kind == GDBWIRE_MI_TUPLE);
GDBWIRE_ASSERT(!mi_thread->variable);
[11:16:49 kunkka @ PostgreSQL ~/Working/cgdb_0.7.1_plus]$

RAFIK SALMI

unread,
Nov 11, 2022, 11:23:31 AM11/11/22
to cgdb
Hi guys ,
I am working with kali linux distribution , and my goal is to work in a "C" program where i write those 2 commands :

$ gcc -g -o  hello hello.c
$ cgdb hello

but the terminal always displays what's in the screenshot , the upper half of the screen steal always with that blue text without displaying the program
What should I do ?Capture d’écran du 2022-11-11 17-12-34.png
Capture d’écran du 2022-11-11 17-12-34.png
Reply all
Reply to author
Forward
0 new messages