This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Breakpoints view. One cannot jump to the breakpoint line

Tags: None
(comma "," separated)
piotrm
Registered Member
Posts
13
Karma
0
OS
Hi

I'm using KDevelop-4.7.1 in Mageia (4.1 and 5 beta 3 version). After setting breakpoints in source code (C++ Qt4 project) I'm not able to jump to the line from breakpoint. I'm just clicking - single click by left mouse button in item on Breakpoints view and nothing happen. I've turned on all debug messages (using kdebugdialog) for kdevelop, but no one appeared when I clicked in item on Breakpoints view. I have tested binaries which came from official repository and tested these one built by myself from source (cmake output told me that all external components found).
Wired is that I've tested it also in OpenSuse 13.2 with KDevelop 4.7.1 (from official OpenSuse repository) and here it works. I didn't test it in other distributions.
I'm not sure how works jumping to breakpoints. Maybe it's depend to some external tool which is missing in Mageia and exists in OpenSuse. Analyzing source code this is last thing which I would like to do. So maybe someone of you is aware where is the problem and could help me.
Maybe in packages coming from Mageia there is no all required dependencies, if any external is missing.

Version of gdb in each distribution is different and they are following:
* gdb-7.8.1 - Mageia 5 beta 3,
* gdb-7.6 - Mageia 4.1
* gdb-7.8 - OpenSuse-13.2

--
Thanks in advance.
User avatar
ivan2k
Registered Member
Posts
5
Karma
0
OS
Hi,
similar problem for me. I'm using KDevelop-4.7.1 with gdb 7.7.1 in Gentoo x86_64, and setting a breakpoint everywhere in code does't interrupt the execution. Even the "pause" button doesn't work.
KDevelop-4.6.0 with same version of gdb works like a charm.

I've turned on debug messages using KDebugDialog for KDevelop, when setting the breakpoint with KDevelop-4.6.0 I can see messages like this:
kdevelop(27441)/kdevelop (gdb debugger) GDBDebugger::BreakpointController::sendMaybe: 0x1f5c280 "/home/<.......>/main.c:94"
kdevelop(27441)/kdevelop (gdb debugger) GDBDebugger::BreakpointController::sendMaybe: location changed
kdevelop(27441)/kdevelop (gdb debugger) GDBDebugger::DebugSession::queueCmd: QUEUE: "-break-insert -f "\"/home/<.......>/main.c\":94""
kdevelop(27441)/kdevelop (gdb debugger) GDBDebugger::DebugSession::debugStateChange: "STATE: +s_dbgBusy "
kdevelop(27441)/kdevelop (gdb debugger) GDBDebugger::DebugSession::_gdbStateChanged: Debugger state: QFlags(0x4000) :
kdevelop(27441)/kdevelop (gdb debugger) GDBDebugger::DebugSession::_gdbStateChanged: ""
kdevelop(27441)/kdevelop (gdb debugger) GDBDebugger::GDB::execute: SEND: "-break-insert -f "\"/home/<.......>/main.c\":94""

But with KDevelop-4.7.1 nothing appear (and breakpoint obviously doesn't work).

In my case i'm developing a STM32 program using cmake, a cross toolchain arm-none-eabi, openocd 0.9.0 with a JTAG adapter, so in the project debug config i have set:
[*] /usr/bin/arm-none-eabi-gdb as "Debugger executable" instead of the standard gdb
[*] a gdb init script at "Run gdb script"

The gdb init script is this:
file /home/<.......>/<project-elf>
target remote localhost:3333
monitor reset halt
load
thbreak main
continue

Another strange behavior with KDevelop-4.7.1 is four strange error messagesbox titled "Internal debugger error" when start debugging (I think those errors are correlated with not working breakpoints). Errors are (some text are translated because my intl is italian):
Exception: MI type error
MI response: ^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x08000114",func="main",args=[{name="argc",value="536870912"},{name="argv",value="0x0"}],file="/home/<.......>/main.c",fullname="/home/<.......>/main.c",line="84"},state="stopped"}],current-thread-id="1"

Exception: MI type error
MI response: ^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}

Exception: MI type error
MI response: ^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x08000114",func="main",args=[{name="argc",value="536870912"},{name="argv",value="0x0"}],file="/home/<.........>/main.c",fullname="/home/<.........>/main.c",line="84"},state="stopped"}],current-thread-id="1

Exception: MI type error
MI response: ^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}

With KDevelop 4.6.0, no error messages and debug start good.

Piotrm, don't know if your problem is correlated with mine but they behave similar with breakpoints not hitting, someone can help me undestand what is wrong ?

Last edited by ivan2k on Sat May 30, 2015 3:09 pm, edited 2 times in total.
User avatar
ivan2k
Registered Member
Posts
5
Karma
0
OS
Ok, found another detail.
Removing "thbreak main" from gdbinit script, avoid the 4 error messageboxes at debug start, but breakpoints and pause button still doesn't work.

EDIT:
In the GDB window, right clicking "View intenal commands" I can see that the 4 commands that generates the 4 errors at debug start are (in reverse order respectively):
[*] (gdb) -thread-info
[*] (gdb) -break-list
[*] (gdb) -var-create var5 @ "time"
[*] (gdb) -break-list
Hope it's usefull ....
nanostrukturtechniker
Registered Member
Posts
1
Karma
0
I stumbled upon the same problem today and so I ran gdb manually, just to see that the debug symbols seem not to be there. I added
Code: Select all
add_definitions(-ggdb -gdwarf-2)

to my CMakeLists.txt and it worked again.

I'm using Kdevelop 4.7.1, GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9, gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2.

Hope, this helps!
User avatar
ivan2k
Registered Member
Posts
5
Karma
0
OS
Thank nanostrukturtechniker but it doesn't work for me ...
piotrm
Registered Member
Posts
13
Karma
0
OS
My problem was actually little different. I'm not able to jump to line set by breakpoint using Breakpoint view. And there is no matter I'm in debug session or not.
Magically it worked only (from tested by me distribution) in OpenSuse 13.2. Unfortunately KDevelop in this distribution has break the showing of stacktrace just after application falls into the trap. The stacktrace is showing only after first step in code (step in or step over).
I've tested Kubuntu, Mageia, KaOS and without success. I suppose that in OpenSuse, KDevelop might to be patched or uses older debug plugin :-/.

I think I should report it as a bug.
@ivan2k. I suggest you do the same.

BTW.
Beside this there are other annoying bugs in debugging handle, being precise the breakpoints handle. I mean "flowing breakpoints". Sometimes there changing its position to really wired places. For example some are setting on top of file (fist in file where often is only comment). Of course source code changed before this "wired change of place". This is really annoying when you start debugging and debugger stops application in different place when you expected :-/.
piotrm
Registered Member
Posts
13
Karma
0
OS
Minor update.

Recently I found out some workaround. To jump to breakpoint location just need to press Enter on highlighted entry.
Of course this is referring to version 4.7.1, because in unstable version 4.90.90 (git master) double click works fine.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]