Author Topic: Symbols Browser disabled in 17.12  (Read 6266 times)

Offline nightlight77

  • Single posting newcomer
  • *
  • Posts: 5
Symbols Browser disabled in 17.12
« on: August 19, 2018, 12:26:01 am »
I upgraded last week from CB 16 to 17 (using it on on Ubuntu 16.04) and now I can't see the symbols browser box (e.g. showing current function), or in debugger the struct field names at some struct pointer p.
E.g. previously in CB16 a struct pointer p would show via watch *p the field names and values. Now it only shows '(*p)->field_offset  field_value' without field names.

Has this problem been fixed since the release of 17.12 version? Is there a work around for debugger issue at least?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Symbols Browser disabled in 17.12
« Reply #1 on: August 26, 2018, 10:40:57 pm »
1. Symbol browser is disabled intentionally for wx3.x builds because it causes many crashes.
2. Nothing has changed in this field of the debugger plugin. Please post the full debugger log, so we're able to help you.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nightlight77

  • Single posting newcomer
  • *
  • Posts: 5
Re: Symbols Browser disabled in 17.12
« Reply #2 on: August 27, 2018, 06:58:32 pm »
I found the cause & fixed one of the problems, the missing enclosing function in the 'code completion' toolbar -- the new CB toolbar drops entire section if there is not enough horizontal space (the old toolbar would truncate it in the middle of the section). The fix amounted to removing one other less useful toolbar so 'code completion' toolbar can fit.

Regarding debugger (missing struct field names) -- how do I get 'full log' (I see only few unrelated log lines in debugger pane)?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Symbols Browser disabled in 17.12
« Reply #3 on: August 27, 2018, 08:01:32 pm »
You have to enable it in the settings of the debugger.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nightlight77

  • Single posting newcomer
  • *
  • Posts: 5
Re: Symbols Browser disabled in 17.12
« Reply #4 on: August 27, 2018, 10:58:54 pm »
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
dbg
Adding source dir: /home/usr/dm/C/exp/showsz/
Adding source dir: /
Adding file: /home/usr/dm/C/exp/showsz/sz
Changing directory to: /home/usr/dm/C/exp/showsz/.
Set variable: LD_LIBRARY_PATH=.:

[debug]Command-line: /usr/bin/gdb -nx -fullname -quiet  -args /home/usr/dm/C/exp/showsz/sz
[debug]Working dir : /home/usr/dm/C/exp/showsz

Starting debugger: /usr/bin/gdb -nx -fullname -quiet  -args /home/usr/dm/C/exp/showsz/sz
done

[debug]Reading symbols from /home/usr/dm/C/exp/showsz/sz...
[debug]done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]Using sleep command's PID as console PID 3911, TTY /dev/pts/5
[debug]Queued:[tty /dev/pts/5]
[debug]GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
[debug]Copyright (C) 2016 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-linux-gnu".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory /home/usr/dm/C/exp/showsz/
[debug]Source directories searched: /home/usr/dm/C/exp/showsz:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory /
[debug]Source directories searched: /:/home/usr/dm/C/exp/showsz:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "/home/usr/dm/C/exp/showsz/main.c:44"
[debug]Breakpoint 2 at 0x401c86: file /home/usr/dm/C/exp/showsz/main.c, line 44.
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/5
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/usr/dm/C/exp/showsz/sz
[debug][Thread debugging using libthread_db enabled]
[debug]Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[debug]Breakpoint 2, main () at /home/usr/dm/C/exp/showsz/main.c:44
[debug]/home/usr/dm/C/exp/showsz/main.c:44:834:beg:0x401c86
[debug]>>>>>>cb_gdb:

At /home/usr/dm/C/exp/showsz/main.c:44

[debug]> info locals
[debug]sa = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"}
[debug]f = {x = 15 '\017', y = 2 '\002', c = 47 '/'}
[debug]htc = {Next = 0x0, Prev = 0x0, htsgn = 0, hseq = 0, st = 0 '\000', isErr = 0 '\000', isSusp = 0 '\000', toResume = 0 '\000', isClose = 0 '\000', isTid = 0 '\000', isDwnl = 0 '\000', isDone = 0 '\000', isFile = 0 '\000', msg = 0 '\000', mevt = 0 '\000', hideIn = 0 '\000', hideOut = 0 '\000', met = 0 '\000', hc = 0 '\000', sc = 0 '\000', narg = 0 '\000', cml = 0, tid = 0, clen = 0, fd = 0, tmr = 0, ulen = 0, {htok = 0, m_efd = 0}, olen = 0, fnlen = 0, opt = 0x0, fname = 0x0, data = 0x0, qsdata = 0x0, qmdata = 0x0, cms = 0x0, gft = 0x0, xurl = 0x0, url = 0x0, args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, rtm = 0, {acc = 0, m_int = 0}, rslen = 0, {xclen = 0, pct = 0}, xcmd = 0x0, rsbuf = 0x0, con = 0x0, hco = 0x0, pctx = 0x0, resp = 0x0, cbfMsg = 0x0, {lsx = 0x0, tr = 0x0, _tv = 0x0, _br = 0x0, zr = 0x0, rc = 0x0, mc503Len = 0}, rv = 0, ip = 0, ut = 0 '\000', tconEnd = 0 '\000', keepResp = 0 '\000', sDone = 0 '\000', blen = 0 '\000', buf = '\000' <repeats 125 times>}
[debug]hp = 0x7fffffffe3b0
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> x/512xb 0x0
[debug]Cannot access memory at address 0x0
[debug]0x0:   >>>>>>cb_gdb:
[debug]> next
[debug]/home/usr/dm/C/exp/showsz/main.c:46:860:beg:0x401c91
[debug]>>>>>>cb_gdb:

At /home/usr/dm/C/exp/showsz/main.c:46

[debug]> info locals
[debug]sa = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"}
[debug]f = {x = 15 '\017', y = 2 '\002', c = 47 '/'}
[debug]htc = {Next = 0x0, Prev = 0x0, htsgn = 0, hseq = 0, st = 0 '\000', isErr = 0 '\000', isSusp = 0 '\000', toResume = 0 '\000', isClose = 0 '\000', isTid = 0 '\000', isDwnl = 0 '\000', isDone = 0 '\000', isFile = 0 '\000', msg = 0 '\000', mevt = 0 '\000', hideIn = 0 '\000', hideOut = 0 '\000', met = 0 '\000', hc = 0 '\000', sc = 0 '\000', narg = 0 '\000', cml = 0, tid = 0, clen = 0, fd = 0, tmr = 0, ulen = 0, {htok = 0, m_efd = 0}, olen = 0, fnlen = 0, opt = 0x0, fname = 0x0, data = 0x0, qsdata = 0x0, qmdata = 0x0, cms = 0x0, gft = 0x0, xurl = 0x40db68 "test-url", url = 0x0, args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, rtm = 0, {acc = 0, m_int = 0}, rslen = 0, {xclen = 0, pct = 0}, xcmd = 0x0, rsbuf = 0x0, con = 0x0, hco = 0x0, pctx = 0x0, resp = 0x0, cbfMsg = 0x0, {lsx = 0x0, tr = 0x0, _tv = 0x0, _br = 0x0, zr = 0x0, rc = 0x0, mc503Len = 0}, rv = 0, ip = 0, ut = 0 '\000', tconEnd = 0 '\000', keepResp = 0 '\000', sDone = 0 '\000', blen = 0 '\000', buf = '\000' <repeats 125 times>}
[debug]hp = 0x7fffffffe3b0
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> x/512xb 0x0
[debug]Cannot access memory at address 0x0
[debug]0x0:   >>>>>>cb_gdb:
[debug]> whatis *hp
[debug]type = HTREQ
[debug]>>>>>>cb_gdb:
[debug]> output *hp
[debug]{Next = 0x0, Prev = 0x0, htsgn = 0, hseq = 0, st = 0 '\000', isErr = 0 '\000', isSusp = 0 '\000', toResume = 0 '\000', isClose = 0 '\000', isTid = 0 '\000', isDwnl = 0 '\000', isDone = 0 '\000', isFile = 0 '\000', msg = 0 '\000', mevt = 0 '\000', hideIn = 0 '\000', hideOut = 0 '\000', met = 0 '\000', hc = 0 '\000', sc = 0 '\000', narg = 0 '\000', cml = 0, tid = 0, clen = 0, fd = 0, tmr = 0, ulen = 0, {htok = 0, m_efd = 0}, olen = 0, fnlen = 0, opt = 0x0, fname = 0x0, data = 0x0, qsdata = 0x0, qmdata = 0x0, cms = 0x0, gft = 0x0, xurl = 0x40db68 "test-url", url = 0x0, args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, rtm = 0, {acc = 0, m_int = 0}, rslen = 0, {xclen = 0, pct = 0}, xcmd = 0x0, rsbuf = 0x0
[debug], con = 0x0, hco = 0x0, pctx = 0x0
[debug], resp = 0x0, cbfMsg = 0x0
[debug], {lsx = 0x0
[debug], tr = 0x0, _tv = 0x0, _br = 0x0, zr = 0x0, rc = 0x0, mc503Len = 0}, rv = 0, ip = 0, ut = 0 '\000', tconEnd = 0 '\000', keepResp = 0 '\000', sDone = 0 '\000', blen = 0 '\000', buf = '\000' <repeats 125 times>}>>>>>>cb_gdb:
[debug]> whatis *hp
[debug]type = HTREQ

[debug]>>>>>>cb_gdb:
[debug]> output *hp
[debug]{Next = 0x0, Prev = 0x0, htsgn = 0, hseq = 0, st = 0 '\000', isErr = 0 '\000', isSusp = 0 '\000', toResume = 0 '\000', isClose = 0 '\000', isTid = 0 '\000', isDwnl = 0 '\000', isDone = 0 '\000', isFile = 0 '\000', msg = 0 '\000', mevt = 0 '\000', hideIn = 0 '\000', hideOut = 0 '\000', met = 0 '\000', hc = 0 '\000', sc = 0 '\000', narg = 0 '\000', cml = 0, tid = 0, clen = 0, fd = 0, tmr = 0, ulen = 0, {htok = 0, m_efd = 0}, olen = 0, fnlen = 0, opt = 0x0, fname = 0x0, data = 0x0, qsdata = 0x0, qmdata = 0x0, cms = 0x0, gft = 0x0, xurl = 0x40db68 "test-url", url = 0x0, args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, rtm = 0, {acc = 0, m_int = 0}, rslen = 0, {xclen = 0, pct = 0}, xcmd = 0x0, rsbuf = 0x0, con = 0x0, hco = 0x0, pctx = 0x0, resp = 0x0, cbfMsg = 0x0, {lsx = 0x0, tr = 0x0, _tv = 0x0, _br = 0x0, zr = 0x0, rc = 0x0, mc503Len = 0}, rv = 0, ip = 0, ut = 0 '\000', tconEnd = 0 '\000', keepResp = 0 '\000', sDone = 0 '\000', blen = 0 '\000', buf = '\000' <repeats 125 times>}>>>>>>cb_gdb:


The last last section (from >>>cb_gdb)  was gdb log output, when at code breakpoint I added *hp to the watches, where hp was ptr to struct HTREQ. The CB16 used to show here struct HTREQ with its fields and values. Indeed  gdb has sent those fields and their values as the log shows. The CB17 only shows field values, but instead of field names it only shows uniformly *hp in the field name column. Right click on the watch *hp with Update (with Auto Update on or off) didn't change this display even though gdb again sent the above struct with field names and values.
« Last Edit: August 27, 2018, 11:03:55 pm by nightlight77 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Symbols Browser disabled in 17.12
« Reply #5 on: August 28, 2018, 09:48:17 am »
Can you show me a screen shot?
Can you reproduce this problem in a minimal sample project you could share with us?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nightlight77

  • Single posting newcomer
  • *
  • Posts: 5
Re: Symbols Browser disabled in 17.12
« Reply #6 on: August 29, 2018, 03:42:45 pm »
I think I see what is the difference here between CB16 and CB17. In CB17 if I make a single step to next line, the fields get updated to proper names from anonymous *hp offset value. In contrast CB16, extracts that info from the gdb message sent when the break point was hit without requiring the next step to show field names. Somehow CB17 is not processing that info about struct it got on breakpoint entry, but only picks it up after the next step is made.

This can be inconvenient because 'next step' may change values or go elsewhere. As a workaround I may have to put breakpoints one step ahead of the place I wanted (whenever possible; e.g. branch selection could be a problem), make the next step to see the field names.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Symbols Browser disabled in 17.12
« Reply #7 on: August 29, 2018, 08:40:19 pm »
I doubt this would help.

Would you provide an answer to my previous post?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nightlight77

  • Single posting newcomer
  • *
  • Posts: 5
Re: Symbols Browser disabled in 17.12
« Reply #8 on: September 01, 2018, 05:49:30 pm »
Debug example below with breakpoint set on the first printf.  When it is hit, add watch *p. The field names for r show up, but not for *p, even though debugger knows the struct layout for *p. But all you see for *p field names when you expand it is string "*p" for each field name.

If you make a single step, the field names for *p now show up.

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

typedef struct _tstrec {
  int key;
  int value;
  uint64_t xval;
  uint32_t flags;
} TSTREC;


int main()
{
  TSTREC r={0};
  TSTREC *p=&r;
    // Add watch for *p when breakpoint is hit on first printf.
    // Field names for r shown correctly when breakpoint hit
    // Field names for *p shown as "*p"; right click on watch *p and Update doesn't help
    printf("Breakpoint here shows no field names for *p \n");
    r.key=1234; // the field names in *p show up after you single step here
    r.value=5678;
    p->xval=0x12345678;
    p->flags=0x400;
    printf("Done test\n");
    return 0;
}

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Symbols Browser disabled in 17.12
« Reply #9 on: September 01, 2018, 09:17:38 pm »
Works fine here (gentoo latest night build). Unfortunately I don't have Ubuntu 16.04 where to test it.

Can you post the full debugger log from a run of the example project? (please use code or quote tags)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]