wsdx

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Can't save changes made during debug #29852
    wsdx
    Participant

    Hello!

    I’ve bought two licences, so can you, please, help us with the last two issues? It seems that natvis file wasn’t uploaded, so I upload it with an extra “.cpp” – “TestNatvis.natvis.cpp”. Also I once again upload example source code “TestNatvis.cpp” and image with Locals for regural msvc and visualGDB.

    Once again:

    1. MyObject is correctly displayed itself but VisualGDB can’t display it as a part of MyClass (green circle on the image)
    2. MyBaseClass in VisualGDB can’t parse <ExpandedItem> *(MyBaseClassImpl*)m_impl </ExpandedItem> and can’t display m_impl content for correspondent class (red circle on the image). I tried to change C cast to (::MyBaseClassImpl*) or (MyBaseClassImpl1*), still no effect. Only (::MyBaseClassImpl1*) made smth meaningful (see “GDB modified” on the picture). It works for MyBaseClassImpl1 (and only for it) and there are two [Raw View] for some reason. Thus, VisualGDB can’t parse content of the virtual class given the pointer to the base class.

    Thank you in advance!

    Attachments:
    You must be logged in to view attached files.
    in reply to: Can't save changes made during debug #29721
    wsdx
    Participant

    Hello!

    Sorry for the long answer. I’ve created a sample project for natvis problems. I am attaching .cpp and .natvis files. I am also attaching a picture with “locals” for regular VS project with MSVC compiler (benchmark) and for VisualGDB project.

    There are two issues:

    1. MyObject and MyClass: MyObject is correctly displayed itself but VisualGDB can’t display it as a part of MyClass (green circle on the image)
    2. MyBaseClass in VisualGDB can’t parse<span style=”color: #0000ff; font-family: Consolas; font-size: small;”><</span><span style=”color: #a31515; font-family: Consolas; font-size: small;”>ExpandedItem</span><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>></span><span style=”font-family: Consolas; font-size: small;”> *(MyBaseClassImpl*)m_impl </span><span style=”color: #0000ff; font-family: Consolas; font-size: small;”></</span><span style=”color: #a31515; font-family: Consolas; font-size: small;”>ExpandedItem</span><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>></span>

      and can’t display m_impl content for correspondent class (red circle on the image). I tried to change <span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #333333; font-family: Georgia; font-size: medium;”>C cast to </span></span>(::MyBaseClassImpl*) or (MyBaseClassImpl1*), still no effect. Only (::MyBaseClassImpl1*) made smth meaningful (see “GDB modified” on the picture). It works for MyBaseClassImpl1 (and only for it) and there are two [Raw View] for some reason. Thus, VisualGDB can’t parse content of the virtual class given the pointer to the base class; also VisualGDB requires :: in C cast, which is not convenient.

    I have one last question: is there a way for two developers to debug simultaniously on the same server?

    Thank you once again for your help.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Can't save changes made during debug #29629
    wsdx
    Participant

    Hello!

    I’ve attached a full log for the breakpoint problem. I needed to change names of files and directories, but I hope it is not a problem. Breakpoint (#2) is set with enabled=”y” and changes to enabled=”n” for no reason. Also for some reason there is an extra breakpoint (#3) at the beginning of the program that I’ve never set.

    I’ll create a sample program for natvis problem soon.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Can't save changes made during debug #29626
    wsdx
    Participant

    Hello,

    Thanks for your respond!

    1.Regarding breakpoints, I guess the problem is that conditional breakpoint is in the different project (DLL linkage) than the executable project. If I set conditional breakpoint in the executable project, it works fine. Simple breakpoints are working fine everywhere. Here is the log:

    -break-insert -f Source.cpp:343
    &”No source file named Source.cpp.\n”
    ^done,bkpt={number=”4″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”Source.cpp:343″,times=”0″,original-location=”Source.cpp:343″}
    -break-condition 4 numPtsU>100
    ^done
    -break-after 4 0
    ^done
    All created breakpoints are pending. VisualGDB will stop at the entry point.

    -exec-run
    =thread-group-started,id=”i1″,pid=”24159″
    =thread-created,id=”1″,group-id=”i1″
    =library-loaded,id=”/lib/ld-linux.so.2″,target-name=”/lib/ld-linux.so.2″,host-name=”/lib/ld-linux.so.2″,symbols-loaded=”0″,thread-group=”i1″
    ~”Reading symbols from /lib/ld-linux.so.2…”
    ~”Reading symbols from /usr/lib/debug/.build-id/c0/c8b7cefa992f5847b9a621bc0e9c5f96771d13.debug…”
    ~”done.\n”
    ~”done.\n”
    ~”Reading in symbols for rtld.c…”
    ~”done.\n”
    &”Error in re-setting breakpoint 4: No source file named Source.cpp.\n”
    ~”Reading symbols from system-supplied DSO at 0xf7fd7000…”
    ~”(no debugging symbols found)…done.\n”

    ~”Reading in symbols for Source.cpp…”
    ~”done.\n”
    =breakpoint-modified,bkpt={number=”4″,type=”breakpoint”,disp=”keep”,enabled=”n”,addr=”0xf093a0ac”,func=”myFunction()”,file=”Source.cpp”,fullname=”Source.cpp”,line=”343″,thread-groups=[“i1″],cond=”numPtsU>100″,times=”0″,original-location=”Source.cpp:343”}

    I highlighted suspicious parts in bold.

    2.Regarding Natvis, {*(::MyClassImpl*)m_pImpl} works fine, thank you very much (however, static_cast and reinterpret_cast doesn’t work). On the other hand, it would be better if we don’t need to change our natvis files…

    Unfortunately, we met some other problems with natvis:

    <Type Name=”MyObject”>
    <DisplayString>dummy</DisplayString>
    <Expand>
    <Item Name=”dummy”>dummy</Item>
    </Expand>
    </Type>

    <Type Name=”MyClass”>
    <DisplayString>dummy</DisplayString>
    <Expand>
    <Item Name=”MyObject”>m_myObject</Item>
    </Expand>
    </Type>

    While objects of type MyObject are displayed correctly themselves, they are displayed in raw view if they are members of MyClass.

    Another problem is that we use this code to display implementation classes for dozens of different public classes:

    <Type Name=”MyBaseClass”>
    <DisplayString>dummy</DisplayString>
    <Expand>
    <ExpandedItem> * ( ::MyBaseClassImpl* ) m_pImpl </ExpandedItem>
    </Expand>
    </Type>

    This code is not working, expanded fields are blank. However, if I change MyBaseClassImpl to MyDerivedClass1Impl, it starts working (of course, only for MyDerivedClass1Impl, which is derived from MyBaseClassImpl). Here is the log:

    -var-create –frame 0 –thread 1 – * “*(::MyDerivedClass1Impl *)(((*(class MyBaseClass*) this)).m_pImpl)”
    ^done,name=”var21″,numchild=”2″,value=”{…}”,type=”MyDerivedClass1Impl”,thread-id=”1″,has_more=”0″
    ptype/mt MyDerivedClass1Impl
    &”ptype/mt MyDerivedClass1Impl\n”
    ~”type = class MyDerivedClass1Impl : public MyBaseClassImpl {\n”
    ~” protected:\n”
    ~” bool m_myVar;\n”
    ~”}\n”
    ^done
    ptype/mt MyDerivedClass1Impl
    &”ptype/mt MyDerivedClass1Impl\n”
    ~”type = class MyDerivedClas1sImpl : public MyBaseClassImpl {\n”
    ~” protected:\n”
    ~” bool m_myVar;\n”
    ~”}\n”
    ^done
    -var-list-children –simple-values “var21″ 0 2
    ^done,numchild=”2″,children=[child={name=”var21.MyBaseClassImpl”,exp=”MyBaseClassImpl”,numchild=”0″,type=”MyBaseClassImpl”,thread-id=”1″},child={name=”var21.protected”,exp=”protected”,numchild=”1″,value=””,thread-id=”1″}],has_more=”0″
    ptype/mt MyBaseClassImpl
    &”ptype/mt MyBaseClassImpl\n”
    ~”type = class MyBaseClassImpl {\n”
    ~”}\n”
    ^done
    ptype/mt MyBaseClassImpl
    &”ptype/mt MyBaseClassImpl\n”
    ~”type = class MyBaseClassImpl {\n”
    ~”}\n”
    ^done
    -var-list-children –simple-values “var21″ 0 2
    ^done,numchild=”2″,children=[child={name=”var21.MyBaseClassImpl”,exp=”MyBaseClassImpl”,numchild=”0″,type=”MyBaseClassImpl”,thread-id=”1″},child={name=”var21.protected”,exp=”protected”,numchild=”1″,value=””,thread-id=”1″}],has_more=”0″
    ptype/mt MyBaseClassImpl
    &”ptype/mt MyBaseClassImpl\n”
    ~”type = class MyBaseClassImpl {\n”
    ~”}\n”
    ^done
    -var-info-type “var21\.protected”
    ^done,type=””
    ptype/mt
    &”ptype/mt \n”
    &”expected space after format\n”
    ^error,msg=”expected space after format”

    I don’t understand the last error message. Maybe, the problem is in the protected variable?

    Thanks again for your help!

    in reply to: Can't save changes made during debug #29609
    wsdx
    Participant

    Hello,
    See in attached file screenshot of the Help->About VisualGDB window

    Attachments:
    You must be logged in to view attached files.
    in reply to: Can't save changes made during debug #29604
    wsdx
    Participant

    We also have a problem with our .natvis file. It seems like there is a problem with C casts in .natvis for VisualGDB. Every expression like

    <DisplayString>{*(MyClassImpl*)m_pImpl}</DisplayString>

    is not parsed correctly and classes with such DisplayString are not displayed correctly during debugging, while MyClassImpl is displayed correctly itself.

    in reply to: Can't save changes made during debug #29603
    wsdx
    Participant

    Hello,

    We run project in Visual GDB but have a problem with conditional breakpoints: they are working fine if they are set within a debugging session. But if we relaunch the project, conditional breakpoints are not hit anymore.

    in reply to: Can't save changes made during debug #29590
    wsdx
    Participant

    Thank you very much for help. We will try it tomorrow and let you know.

Viewing 8 posts - 1 through 8 (of 8 total)