Gdb from 6-2016-q4-major not working well with Segger GDB Server

Asked by d.ry

I'm going to be hated for this vague bug report, but.

I have upgraded to this latest (bleeding edge?) 6-2016-q4-major, and immediately noticed that my debugging is not working the same: I can upload code and run it, but cannot pause or stop execution, and some breakpoints don't work. I'm using this with Segger's GDBServer latest (and same with and older version).

In the immediate previous version 5-2016-q3 I didn't have this issue. So for now I just went back in the gdb (just by using it for debug but keeping rest of toolchain).

I also have to note that, besides that I see GDB versions are different between these, I also was using 32bit version in 5-2016-q3 unlike now its 64bit (and 32bit builds were dropped). Probably that shoudn't matter, but still .

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tejas Belagod (belagod-tejas) said :
#1

Hi,

Thanks for the report. We will need a more detailed report to reproduce this on our side. We will need

1. A *minimal* test case that demonstrates this behaviour. Also the toolchain(s) command-line that was used to build the executable.
2. GDB and Segger GDB server command-lines used to debug the application.
3. The enviromments (for both GDB and GDB server) that they were running on (OS, 32/64 bit etc)
4. What hardware were you using?

Thanks,
Tejas.

Revision history for this message
Freddie Chopin (freddie-chopin) said :
#2

Any chance you are using all of that in the most recent version of Eclipse?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=509788

Revision history for this message
d.ry (d.ry) said :
#3

Tejas
Ok i would need time to prepare what you ask.
Hardware is Vybrid, working on the M4 core.

Revision history for this message
d.ry (d.ry) said :
#4

Freddie,

Yea that seems like the problem I'm having. Except that for me, it seems that if I got back with just the GDB client from previous toolchain, then Eclipse Neon 2 behaves ok.
But I'm missing the full communication log between the client / server: previous version of Eclipse displayed everything, including the full transaction of uploading the firmware, all monitor commands etc. New Eclipse doesn't show this.
So will make my work a bit harder to produce the test case.

Just proved myself again, never go to latest version / bleeding edge ... urgh

Revision history for this message
Tejas Belagod (belagod-tejas) said :
#5

D.ry,

Do you have the same issue(s) if you work with pure command-line and no UI/Eclipse ?

Thanks,
Tejas.

Revision history for this message
Freddie Chopin (freddie-chopin) said :
#6

If you revert to previous release of the toolchain, there is no problem, because this very specific problem requires GDB 7.12 or later to appear.

https://wiki.eclipse.org/CDT/FullGDBConsole

As previous release of the toolchain used GDB 7.10, this new feature of Eclipse is not used, so there's no problem.

The solution is - unfortunately - to downgrade Eclipse to previous version and wait for a fix in CDT and/or GDB Hardware Debugging plugin.

Revision history for this message
Freddie Chopin (freddie-chopin) said :
#7

BTW - you can also use new Eclipse with new toolchain, but use GDB from previous toolchain version - just use full path to executable in the configuration of debug session.

Revision history for this message
d.ry (d.ry) said :
#8

Yea Freddie,
as I wrote, this is what I'm using - the 32bit version of GDB from previous toolchain release. 7.10.1.20160923-cvs , 32bit build.

But to be honest, now that i've used it for a day debugging, i see something else going weird, single stepping can freeze and gdb log reports packets timeout or incomplete.
Probably this Eclipse is f0kred, I'm downgrading it, may be back to Mars.

As such my bug report here most likely is misdirected.

Revision history for this message
Freddie Chopin (freddie-chopin) said :
#9

For now I'm using Neon.1 (previous version) with the most recent GDB (from my own toolchain - https://github.com/FreddieChopin/bleeding-edge-toolchain ) and it seems to work fine, I did not notice anything like what you describe with single stepping, but maybe it's still ahead of me (;

BTW - make sure to post your comment in the Eclipse bug that I've linked - the more users report it, the more change we have to see a solution.

Revision history for this message
d.ry (d.ry) said :
#10

Yea seeing your bug report @ Eclipse I've just downgraded to Neon 1, and did a quick test.
I think it's back to normal where Mars was, I got my Segger console back with all detailed traces, and just quick debugging session I had went ok, can step through things with no timeouts, and stat/stop pause works.
(The only thing was Neon2 made all workspaces not compatible with previous eclipse ... urgh)

So I do apologize for jumping to report it's the new Gdb issue ... Somehow this fat Java stack in between and I didn't think of it possibly causing any problems.

Revision history for this message
KD (buckfobb) said :
#11

I've recently started using Eclipse (Neon.2; OSX)/GNU ARM Eclipse to debug on an LPC4350, which is dual core M4 and M0. I've run into similar issues as noted above. Neon.2 doesn't work with the latest gdb 7.12 client, but does with prior clients. However, I also get the "weird, single stepping can freeze" with gdb reporting "Ignoring packet error, continuing...", which I'm assuming is the same thing you're seeing @d.ry. I've downgraded to Neon.1 and still get this error, even using gdb clients back to 2014, although it seems like it takes more steps before it happens (maybe 20-30 steps?). @d.ry: you mention that you're not getting the timeouts anymore. Is this still the case? Just looking for any hints to get it not to hang up on the debug...

Revision history for this message
d.ry (d.ry) said :
#12

Hi KD,
If you still getting this issue on Neon.1 then its probably bad news for me, I just haven't hit it yet.
But last night at least it worked ok, this morning too. I don't single step the entire program though,
just few steps.
Btw, I'm using 32bit GDB built from last/previous release 5-2016-q3.

( Overall I have to say this Eclipse-GDB-SeggerGDBServer-SeggerJTAG is a very fragile process ).

Revision history for this message
d.ry (d.ry) said :
#13

Hey Freddie Chopin, can I ask you which version of Eclipse (CDT) you on now? Neon 2, 3 ?

Can you help with this problem?

Provide an answer of your own, or ask d.ry for more information if necessary.

To post a message you must log in.