Problem debugging nested structs in DAVE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

if I nest structs I am unable to see the contents in the debugger.

The following is shown:
Failed to execute MI command:
-data-evaluate-expression (udpIp4Packet).dstMac
Error message from debugger back end:
There is no member named dstMac.


It works one level deep, but fails at two or more.
0 Likes
15 Replies
Not applicable
HI,

I am not sure as this seems to be a failure to load the debugger or debugger understanding the compiled code.
Can you share a project for us to evaluate into this issue.

Regards,
Daryl
0 Likes
Not applicable
DAVE 4.1.4

Default CE-Project. Name: test. Only build a struct in struct in struct. Debugger setup unchanged from default.

XMC4800 Relax Kit (ETHERCAT)

1811.attach

1810.attach

1809.attach

Segger Setup/Version (as delivered with DAVE 4.1.4)
1812.attach

And this is how it looks if the levels get deeper.
1813.attach
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
And this is the code.

0 Likes
Not applicable
Hi,

I have run your project.

The updates are done correctly in the debugger. However, the error message you listed appears in the window. 😞

I have forwarded this to the DAVE team to check this out. I will update you once I get an input from them. 🙂

Regards,
Daryl
0 Likes
Not applicable
At least you can reproduce the error. Thats fine.

Keep me updated.

PS: Any Feedback on my ethernet speed limit problem. http://www.infineonforums.com/threads/3756-Maximum-Ethernet-Speed-with-XMCLib-and-XMC4800-on-Relax-K...
Nobody posted any clues.
0 Likes
Not applicable
0 Likes
Not applicable
I have seen it. Thank you. Less problems open to fix. Looking forward for the answer to this thread.
0 Likes
Not applicable
This problem is still pending!

It seems gnuarmeclipse-plugin or segger-j-link-plugin (or something else) is doing wrong.

As you can see, the variables windows (and the error) show that eclipse/plugin/j-link tries to read s_a.c but it should try reading s_a.s_b.c

AND sometimes the shown values are COMPLETELY wrong.

Actual DAVE, and this is with the latest Segger J-Link toolchaing AND even with a manually updated j-link plugin in DAVE.

Please help. Debugging is a pain with this.
0 Likes
Not applicable
Its broken! Simple to redo.

2090.attach

2091.attach

You can open endless.
0 Likes
Not applicable
Hello,

I tried GDB-Hardware-Debugging instead of GDB Segger J-Link Debugging (of gnuarmeclipse).

If I switch to Legacy GDB Hardware Debugging it works as expected.
2094.attach
Remark: Only in legacy mode!

Here setup
2093.attach

And here
2092.attach


SEGGER J-Link GDB-Server started manually.

Result
2095.attach

gdb mi debugging console when clicking onto a.a.b
2096.attach

I asked the gnuarmeclipse head developer Liviu Ionescu .

The answer:
> CDT Hardware Debug in DSF mode shows the same error.
> CDT Hardware Debug in legacy mode does NOT show the error. Everything is ok.
> You suggest to report to eclipse or may you want more information?
yes, you should report it to Eclipse (if not already reported), but don't expect them to jump and fix it, from my experience the only way to fix a problem is to submit a patch and push them to accept it.
the 'legacy mode' is no longer supported. the new DSF is extremely complicated and still has several problems.
the GNU ARM Eclipse debugging plug-ins use DSF and it is not possible to switch back to legacy mode.
regards,
Liviu


As you see. DAVE uses gnuarmeclipse, gnuarmeclipse uses DSF mode and not legacy mode. The problem above is an error in DSF.

I will ad a next post where I show the results in DSF Mode with CDT Hardware Debug.

PLEASE try to get that fixed on eclipse or where it needs to be fixed!
Especially when debugging C++ this will grow hairs on your teeth.
0 Likes
Not applicable
And now in DSF Debug:
2097.attach

Broken
2098.attach

Very broken
2099.attach

Any further information needed?
0 Likes
Not applicable
HI,

I could observe that when a non-unique variable name is used in the structure, endless unfolding of the variable occurs in the debug window.
When a unique variable name is used, the endless unfolding is not present. This could be the workaround for the time-being while our development investigate for a solution.

In the meanwhile, I have filed an eTicket (#873401108) for this issue and it can be viewed in link below.
https://www.infineonforums.com/support/dave3/index.php?option=com_maqmahelpdesk&Itemid=0&id_workgrou...

Regards,
Daryl
0 Likes
Not applicable
It is not the only problem. It is just a special case to show of the urgency of this bug. The example at the start at the threads shows another case of this bug.
The debugger sometimes shows the wrong values and sometimes it shows the values of other varibles in structs or garbage.
One can simply not believe what the debugger shows in nested structs. Feel free to investigate further.
I hope it gets reported upstream from Infineon (and fixed).
0 Likes
Not applicable
Hello,

another testcase to show the bug.

2102.attach

As you see, all structs got unique variable names.

2103.attach

And here you see:

Failed to execute MI command:
-data-evaluate-expression (stuff).a
Error message from debugger back end:
There is no member named a.


The varibles are not correctly referenced and the value-column shows the same value for different variables. Setting a variable fails.

It should evaluate (((stuff).B_a).A_a).a but evalutes (stuff).a which does not exist.
0 Likes
Not applicable
I tried an actual eclipse (Mars.2) install with integrated CDT (hardware debugging 8.8.1.201602051005) to debug.

The problem is still there.
0 Likes