[Bug mi/25153] New: In mi mode and with pretty printer, variable with child shows no value when using -var-create

piel at microsoft dot com sourceware-bugzilla@sourceware.org
Fri Nov 1 21:53:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=25153

            Bug ID: 25153
           Summary: In mi mode and with pretty printer, variable with
                    child shows no value when using -var-create
           Product: gdb
           Version: 8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: piel at microsoft dot com
  Target Milestone: ---

Created attachment 12061
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12061&action=edit
code and pretty printer example

OS: Ubuntu 18.04
gdb version 8.2
gcc version 7.3.0

Pretty printing enabled for an object with a child object, -var-create shows a
value of {...} even though gdb in normal mode ("p <object>") shows that it has
a value.

With pretty printer enabled, "p d" gives 
1: (613612) ->~"$2 = \"Test\""
1: (613613) ->~" = {value1 = 1"
1: (613613) ->~", value2 = 2"
1: (613613) ->~", dc = \"Child\""
1: (613613) ->~" = {child_value1 = 9"
1: (613614) ->~", child_value2 = 8"
1: (613614) ->~"}}\n"

but -var-create - * "d" gives 
^done,name="var10",numchild="0",value="{...}",type="test::debug",thread-id="1",dynamic="1",has_more="1"

Sample .cpp and pretty printer python file are attached.

RE:https://github.com/microsoft/vscode-cpptools/issues/2792

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list