Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 544410 - dev-util/kdevelop-4.7.1 - remote debugging error
Summary: dev-util/kdevelop-4.7.1 - remote debugging error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 03:09 UTC by Fernando Rodriguez
Modified: 2015-08-03 13:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,6.53 KB, text/plain)
2015-03-25 03:11 UTC, Fernando Rodriguez
Details
gdb patch (kdev-4.7.1-gdb.patch,607 bytes, patch)
2015-05-01 05:51 UTC, Fernando Rodriguez
Details | Diff
kdev-4.7.1-gdb.patch (kdev-4.7.1-gdb.patch,607 bytes, patch)
2015-05-01 05:52 UTC, Fernando Rodriguez
Details | Diff
kdevelop-4.7.1.ebuild (kdevelop-4.7.1.ebuild,1.51 KB, text/plain)
2015-05-01 05:54 UTC, Fernando Rodriguez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Rodriguez 2015-03-25 03:09:51 UTC
When starting a remote debugging session I get the following error (about 4 times) right before the program breaks into main():

The debugger component encountered internal error while processing
reply from gdb. Please submiit a bug report.

The exception is: MI type error
The MI response is: ^done,threads=[{id="1",target-id="Thread 1",details="CPU#0 
[running]",frame={level="0",addr="0x0011099c",func="hydrax_init",args=[{name=
"p_mboot",value="0x10000"},{name="initial_stack",value="524032"}],file="main.c",
fullname="/home/fernan/Projects/hydrax/kernel/main.c",line="45"},state="stopped"
}],current-thread-id="1" 

After I OK the error dialog things may seem fine except that breakpoints in some files don't work at all (I can set them but it never breaks). It happens every time but I don't see any obvious reason why it happens where it does. Breakpoints on the same files work fine when set from the gdb cli or another frontend (kdbg). It only happens with version 4.7.1, 4.6.0 and 4.7.0 (which was deleted) both work fine.

I have tested and been able to reproduce with the latest stable gdb and all the unstables except 9999 (which I didn't test).

Reproducible: Always

Steps to Reproduce:
1.Setup a host to debug. I used QEMU with the built-in GDB stub.
2.Setup Remote Debugging on Kdevelop - My setup is pretty much the same as this: https://sites.google.com/site/embedded2009/weekly-small-project-list/use-kdevelop-to-develop-linux-kernel except I'm not debugging the Linux kernel and I'm using i386.
3.Press debug launch shortcut to start debuggig.
Actual Results:  
Error dialog is shown and some breakpoints don't work.

Expected Results:  
Everything works.
Comment 1 Fernando Rodriguez 2015-03-25 03:11:43 UTC
Created attachment 399704 [details]
emerge --info
Comment 3 Fernando Rodriguez 2015-04-30 18:14:02 UTC
Thank you. Unfortunately, no dice. Both commits are already on 4.7.1
Comment 4 Fernando Rodriguez 2015-05-01 05:51:16 UTC
Created attachment 402360 [details, diff]
gdb patch
Comment 5 Fernando Rodriguez 2015-05-01 05:52:59 UTC
Created attachment 402362 [details, diff]
kdev-4.7.1-gdb.patch
Comment 6 Fernando Rodriguez 2015-05-01 05:54:03 UTC
Created attachment 402364 [details]
kdevelop-4.7.1.ebuild
Comment 7 Fernando Rodriguez 2015-05-01 06:13:43 UTC
Well, you where right about the commit that introduced the bug. It looks like they're assuming that the "thread-group-started" message will always come as a response to a exec-run command. In my case it is being sent by gdb when the gdbinit file is loaded, so it's marking the last command as received and it gets out of sync with gdb.

I uploaded a patch and an updated ebuild. I just went by their comment that seems to indicate that the message is only expected for the exec-run command and only set the flag when that's the current command. I'll file an upstream bug, in the meantime this fixes the problem.

It probably should never be set there because -exec-run gives a ^running response?
Comment 8 Fernando Rodriguez 2015-05-01 06:44:06 UTC
https://bugs.kde.org/show_bug.cgi?id=346827
Comment 9 Michael Palimaka (kensington) gentoo-dev 2015-05-04 15:08:14 UTC
Thanks for the investigation. Hopefully we can get your patch integrated upstream, backport it, and finally get 4.7.1 stabilised.
Comment 10 Michael Palimaka (kensington) gentoo-dev 2015-08-03 13:10:01 UTC
Thank-you for reporting and following up. This is now fixed in CVS.

+  03 Aug 2015; Michael Palimaka <kensington@gentoo.org>
+  +files/kdevelop-4.7.1-gdb.patch, +kdevelop-4.7.1-r1.ebuild:
+  Backport patch from upstream to solve remote debugging error wrt bug #544410.