Discussion:
Remote, embedded debugging
Timo
2011-06-03 06:20:36 UTC
Permalink
Dear List,

This is my first post on this list. I'm working for a small company in
Finland on mostly ARM-based embedded systems. I've been using KDevelop
as an IDE and debugging frontend from ancient times and I'm quite used
to it.

But there is a couple of quirks I would like to talk about.

When I start debugging session, KDevelop reports about an error:

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

The exception is: MI type error
The MI response is: ^done
However, debugging works after that, mostly. I'll paste 'internal
commands' output later.

KDevelop seems not to tell GDB about the executable file to be debugged.
I have put it into the gdbinit file as a 'file' command but I think
KDevelop should take it from the 'Executable' field in the 'Launch
Configuration'. At least older versions did.

My breakpoints doesn't activate. I have to delete them altogether and
then set them again. In older versions of KDevelop it was enough to
disable and enable them during the session.

Am I doing something wrong, should I report these as bugs or wait for an
update?

KDevelop version:
=================

Version 4.0.0 (using KDevPlatform 1.0.0)
Using KDE Development Platform 4.4.5 (KDE 4.4.5)

On Ubuntu 10.04.2

Internal Commands:
==================

(gdb) -gdb-exit
(gdb) quit
^exit
/arm/sg-none-eabi/bin/arm-none-eabi-gdb --interpreter=mi2 -quiet
(gdb) -gdb-show version
GNU gdb (Sourcery G++ Lite 2011.03-42) 7.2.50.20100908-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=arm-none-eabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>.
^done
(gdb) -gdb-set width 0
^done
(gdb) -gdb-set height 0
^done
(gdb) handle SIG32 pass nostop noprint
handle SIG32 pass nostop noprint
Signal Stop Print Pass to program Description
SIG32 No No Yes Real-time event 32
^done
(gdb) handle SIG41 pass nostop noprint
handle SIG41 pass nostop noprint
Signal Stop Print Pass to program Description
SIG41 No No Yes Real-time event 41
^done
(gdb) handle SIG42 pass nostop noprint
handle SIG42 pass nostop noprint
Signal Stop Print Pass to program Description
SIG42 No No Yes Real-time event 42
^done
(gdb) handle SIG43 pass nostop noprint
handle SIG43 pass nostop noprint
Signal Stop Print Pass to program Description
SIG43 No No Yes Real-time event 43
^done
(gdb) -enable-pretty-printing
^done
(gdb) source /usr/share/kde4/apps/kdevgdb/printers/gdbinit
source /usr/share/kde4/apps/kdevgdb/printers/gdbinit
/usr/share/kde4/apps/kdevgdb/printers/gdbinit:14: Error in sourced
command file:
Python scripting is not supported in this copy of GDB.
^error,msg="/usr/share/kde4/apps/kdevgdb/printers/gdbinit:14: Error in
sourced command file:\nPython scripting is not supported in this copy of
GDB."
(gdb) -inferior-tty-set /dev/pts/12
^done
(gdb) -environment-cd /home/timo/projects/ccd1100/boot/obj-arm-none-eabi
^done
(gdb) -gdb-set environment CROSS=arm-none-eabi
^done
(gdb) -gdb-set environment PATH=/arm/sg-none-eabi/bin:/usr/bin:/bin
^done
(gdb) -gdb-set print static-members off
^done
(gdb) -gdb-set print asm-demangle on
^done
(gdb) source /home/timo/projects/ccd1100/gdbinit
source /home/timo/projects/ccd1100/gdbinit
=thread-group-started,id="i1",pid="42000"
=thread-created,id="1",group-id="i1"
0x0000087c in ?? ()
*stopped,frame={addr="0x0000087c",func="??",args=[]},thread-id="1",stopped-threads="all"
(gdb) -thread-info
^done
warning: RMT ERROR : failed to get remote thread list.
^done,threads=[{id="1",target-id="Remote
target",frame={level="0",addr="0x0000087c",func="main",args=[{name="argc",value="<value
optimized out>"},{name="argv",value="<value optimized
out>"}],file="main.c",fullname="/home/timo/projects/ccd1100/boot/main.c",line="578"},state="stopped"}],current-thread-id="1"
(gdb) -break-list
^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=[]}
(gdb) -stack-list-frames --thread 1 0 21
^done,stack=[frame={level="0",addr="0x0000087c",func="main",file="main.c",fullname="/home/timo/projects/ccd1100/boot/main.c",line="578"}]
(gdb) -stack-list-locals --thread 1 --frame 0 --simple-values
^done,locals=[{name="c",type="int",value="<value optimized
out>"},{name="t",type="int",value="399002"},{name="i",type="unsigned
int",value="4294928992"},{name="ch",type="unsigned
int",value="0"},{name="inp",type="unsigned int",value="4194304"}]
(gdb) -var-update --thread 1 --frame 0 --all-values *
^done,changelist=[]
(gdb) -stack-list-arguments --thread 1 --frame 0 0 0 0
^done,stack-args=[frame={level="0",args=[name="argc",name="argv"]}]
(gdb) -var-create --thread 1 --frame 0 var83 @ c
^done,name="var83",numchild="0",value="<value optimized
out>",type="int",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var84 @ t
^done,name="var84",numchild="0",value="399002",type="int",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var85 @ i
^done,name="var85",numchild="0",value="4294928992",type="unsigned
int",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var86 @ ch
^done,name="var86",numchild="0",value="0",type="unsigned
int",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var87 @ inp
^done,name="var87",numchild="0",value="4194304",type="unsigned
int",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var88 @ argc
^done,name="var88",numchild="0",value="<value optimized
out>",type="int",thread-id="1",has_more="0"
(gdb) -var-create --thread 1 --frame 0 var89 @ argv
^done,name="var89",numchild="1",value="<value optimized out>",type="char
**",thread-id="1",has_more="0"

--

Timo
Sundberg
2011-06-03 11:30:55 UTC
Permalink
Hello,


I am not sure if this is completely unrelated but i have bit similar
issue with libtool and debugging shell.

The older version seemed to start kdevelop with "$shell $gdb
$file_to_debug" -- that works well with libtool, as i have understood
that libtool , when launched, changes $file_to_debug to be proper
$file_to_debug_accordingly_libtool.

However the new version passes the $file_to_debug in inside gdb as an
internal command, that makes using libtool as debugging shell useless --
it cannot change the $file_to_debug to
$file_to_debug_accordingly_libtool as it is passed inside gdb.

I shortly looked at the code but i found no quick solution so i just
accepted doing make install before debugging, though it certainly is not
the proper solution.


Cheers,
Pauli
Post by Timo
Dear List,
This is my first post on this list. I'm working for a small company in
Finland on mostly ARM-based embedded systems. I've been using KDevelop
as an IDE and debugging frontend from ancient times and I'm quite used
to it.
But there is a couple of quirks I would like to talk about.
<<<<
The debugger component encountered internal error while processing reply
from gdb. Please submit a bug report.
The exception is: MI type error
The MI response is: ^done
However, debugging works after that, mostly. I'll paste 'internal
commands' output later.
KDevelop seems not to tell GDB about the executable file to be debugged.
I have put it into the gdbinit file as a 'file' command but I think
KDevelop should take it from the 'Executable' field in the 'Launch
Configuration'. At least older versions did.
My breakpoints doesn't activate. I have to delete them altogether and
then set them again. In older versions of KDevelop it was enough to
disable and enable them during the session.
Am I doing something wrong, should I report these as bugs or wait for an
update?
=================
Version 4.0.0 (using KDevPlatform 1.0.0)
Using KDE Development Platform 4.4.5 (KDE 4.4.5)
On Ubuntu 10.04.2
==================
(gdb) -gdb-exit
(gdb) quit
^exit
/arm/sg-none-eabi/bin/arm-none-eabi-gdb --interpreter=mi2 -quiet
(gdb) -gdb-show version
GNU gdb (Sourcery G++ Lite 2011.03-42) 7.2.50.20100908-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=arm-none-eabi".
<https://support.codesourcery.com/GNUToolchain/>.
^done
(gdb) -gdb-set width 0
^done
(gdb) -gdb-set height 0
^done
(gdb) handle SIG32 pass nostop noprint
handle SIG32 pass nostop noprint
Signal Stop Print Pass to program Description
SIG32 No No Yes Real-time event 32
^done
(gdb) handle SIG41 pass nostop noprint
handle SIG41 pass nostop noprint
Signal Stop Print Pass to program Description
SIG41 No No Yes Real-time event 41
^done
(gdb) handle SIG42 pass nostop noprint
handle SIG42 pass nostop noprint
Signal Stop Print Pass to program Description
SIG42 No No Yes Real-time event 42
^done
(gdb) handle SIG43 pass nostop noprint
handle SIG43 pass nostop noprint
Signal Stop Print Pass to program Description
SIG43 No No Yes Real-time event 43
^done
(gdb) -enable-pretty-printing
^done
(gdb) source /usr/share/kde4/apps/kdevgdb/printers/gdbinit
source /usr/share/kde4/apps/kdevgdb/printers/gdbinit
/usr/share/kde4/apps/kdevgdb/printers/gdbinit:14: Error in sourced
Python scripting is not supported in this copy of GDB.
^error,msg="/usr/share/kde4/apps/kdevgdb/printers/gdbinit:14: Error in
sourced command file:\nPython scripting is not supported in this copy of
GDB."
(gdb) -inferior-tty-set /dev/pts/12
^done
(gdb) -environment-cd /home/timo/projects/ccd1100/boot/obj-arm-none-eabi
^done
(gdb) -gdb-set environment CROSS=arm-none-eabi
^done
(gdb) -gdb-set environment PATH=/arm/sg-none-eabi/bin:/usr/bin:/bin
^done
(gdb) -gdb-set print static-members off
^done
(gdb) -gdb-set print asm-demangle on
^done
(gdb) source /home/timo/projects/ccd1100/gdbinit
source /home/timo/projects/ccd1100/gdbinit
=thread-group-started,id="i1",pid="42000"
=thread-created,id="1",group-id="i1"
0x0000087c in ?? ()
*stopped,frame={addr="0x0000087c",func="??",args=[]},thread-id="1",stopped-threads="all"
(gdb) -thread-info
^done
warning: RMT ERROR : failed to get remote thread list.
^done,threads=[{id="1",target-id="Remote
target",frame={level="0",addr="0x0000087c",func="main",args=[{name="argc",value="<value
optimized out>"},{name="argv",value="<value optimized
out>"}],file="main.c",fullname="/home/timo/projects/ccd1100/boot/main.c",line="578"},state="stopped"}],current-thread-id="1"
(gdb) -break-list
^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=[]}
(gdb) -stack-list-frames --thread 1 0 21
^done,stack=[frame={level="0",addr="0x0000087c",func="main",file="main.c",fullname="/home/timo/projects/ccd1100/boot/main.c",line="578"}]
(gdb) -stack-list-locals --thread 1 --frame 0 --simple-values
^done,locals=[{name="c",type="int",value="<value optimized
out>"},{name="t",type="int",value="399002"},{name="i",type="unsigned
int",value="4294928992"},{name="ch",type="unsigned
int",value="0"},{name="inp",type="unsigned int",value="4194304"}]
(gdb) -var-update --thread 1 --frame 0 --all-values *
^done,changelist=[]
(gdb) -stack-list-arguments --thread 1 --frame 0 0 0 0
^done,stack-args=[frame={level="0",args=[name="argc",name="argv"]}]
^done,name="var83",numchild="0",value="<value optimized
out>",type="int",thread-id="1",has_more="0"
^done,name="var84",numchild="0",value="399002",type="int",thread-id="1",has_more="0"
^done,name="var85",numchild="0",value="4294928992",type="unsigned
int",thread-id="1",has_more="0"
^done,name="var86",numchild="0",value="0",type="unsigned
int",thread-id="1",has_more="0"
^done,name="var87",numchild="0",value="4194304",type="unsigned
int",thread-id="1",has_more="0"
^done,name="var88",numchild="0",value="<value optimized
out>",type="int",thread-id="1",has_more="0"
^done,name="var89",numchild="1",value="<value optimized out>",type="char
**",thread-id="1",has_more="0"
--
Timo
_______________________________________________
kdevelop mailing list
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop
Timo
2011-06-03 11:53:13 UTC
Permalink
Post by Sundberg
However the new version passes the $file_to_debug in inside gdb as an
internal command, ...
Do you see in the internal command log an attempt to load the
executable? Where? I don't see it in my case. I wonder if that relates
to the error in the startup...

--

Timo
Leon Pollak
2011-06-03 14:47:33 UTC
Permalink
Just to add my 2c about the remote debugging I do with Kdev for the last 5
years...

The last trunk version still has the same problems with breakpoints and
starting the gdb.
I do two following workarounds:
1. Recompile the kdevelop with file kdevelop/debuggers/gdb/debugsession.cpp
line 1082 comment out 'else'.
2. Put 'br main' into your .gdbinit file.

These two things will allow break points and remote loading to work.

Hope this helps.
--
Leon
Timo
2011-06-03 18:54:51 UTC
Permalink
1. Recompile the kdevelop with file ...
Thanks for the hint. I'll try to get motivated for the build job. Have
you noticed any side effects? Does the patched KDev function normally in
native debugging?

--

Timo
Leon Pollak
2011-06-03 19:15:02 UTC
Permalink
Post by Timo
1. Recompile the kdevelop with file ...
Thanks for the hint. I'll try to get motivated for the build job. Have
you noticed any side effects? Does the patched KDev function normally in
native debugging?
I did not noticed a problem. This patch was recommended by the debugger
interface developer (but for some reason still not introduced into the trunk).
Build job runs smoothly (I do this once a week).
--
Leon
Niko Sams
2011-06-03 22:10:21 UTC
Permalink
Hi,

The first workaround is needed because you use a gdb script (configured in the
launch configuration). If you use a gdb script kdevelop doesn't "file"
or "run" for you,
as you are supposed to do that in your script.
Is that a wrong assumption?

And the second thing... well, does that fix anything? It just breaks
in main - you could also
add that breakpoint using the breakpoints toolview.

Niko
Post by Leon Pollak
Just to add my 2c about the remote debugging I do with Kdev for the last 5
years...
The last trunk version still has the same problems with breakpoints and
starting the gdb.
1. Recompile the kdevelop with file kdevelop/debuggers/gdb/debugsession.cpp
line 1082 comment out 'else'.
2. Put 'br main' into your .gdbinit file.
These two things will allow break points and remote loading to work.
Hope this helps.
--
Leon
_______________________________________________
kdevelop mailing list
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop
Leon Pollak
2011-06-03 22:57:45 UTC
Permalink
Post by Niko Sams
Hi,
The first workaround is needed because you use a gdb script (configured in
the launch configuration). If you use a gdb script kdevelop doesn't "file"
or "run" for you,
as you are supposed to do that in your script.
Is that a wrong assumption?
Without this, kdevelop does not react to run/cont command always being in
'run' state.
Post by Niko Sams
And the second thing... well, does that fix anything? It just breaks
in main - you could also
add that breakpoint using the breakpoints toolview.
If I do not put 'br main' in the start script, the breakpoints in the BP view
are not set and application does not stop at all.
Post by Niko Sams
Niko
Post by Leon Pollak
Just to add my 2c about the remote debugging I do with Kdev for the last
5 years...http://www.teranews.com/
The last trunk version still has the same problems with breakpoints and
starting the gdb.
1. Recompile the kdevelop with file
kdevelop/debuggers/gdb/debugsession.cpp line 1082 comment out 'else'.
2. Put 'br main' into your .gdbinit file.
These two things will allow break points and remote loading to work.
Hope this helps.
--
Leon
_______________________________________________
kdevelop mailing list
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop
_______________________________________________
kdevelop mailing list
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop
-
Leon
Niko Sams
2011-06-04 16:35:15 UTC
Permalink
Post by Leon Pollak
Post by Niko Sams
Hi,
The first workaround is needed because you use a gdb script (configured in
the launch configuration). If you use a gdb script kdevelop doesn't "file"
or "run" for you,
as you are supposed to do that in your script.
Is that a wrong assumption?
Without this, kdevelop does not react to run/cont command always being in
'run' state.
Ok, so do you "run" in your script?
Post by Leon Pollak
Post by Niko Sams
And the second thing... well, does that fix anything? It just breaks
in main - you could also
add that breakpoint using the breakpoints toolview.
If I do not put 'br main' in the start script, the breakpoints in the BP
view are not set and application does not stop at all.
Ok, I see.
Now I need a way to reproduce this on my machine. Could you help me with that?

Niko
Andrey Batyiev
2011-06-04 18:32:18 UTC
Permalink
Hello

Looks like it's related to https://bugs.kde.org/show_bug.cgi?id=274390

I'm using gdb-7.2 on gentoo without any problems.


Andrey
Leon Pollak
2011-06-04 20:35:05 UTC
Permalink
Post by Andrey Batyiev
Hello
Looks like it's related to https://bugs.kde.org/show_bug.cgi?id=274390
I'm using gdb-7.2 on gentoo without any problems.
Not sure about the relevance of this bug report.
Note, that we are speaking about remote debugging.
BR
--
Leon
Leon Pollak
2011-06-04 20:33:05 UTC
Permalink
Post by Niko Sams
Post by Leon Pollak
Without this, kdevelop does not react to run/cont command always being in
'run' state.
Ok, so do you "run" in your script?
Yes. Without the 'run' kdevelop is confused.
Post by Niko Sams
Post by Leon Pollak
If I do not put 'br main' in the start script, the breakpoints in the BP
view are not set and application does not stop at all.
Ok, I see.
Now I need a way to reproduce this on my machine. Could you help me with that?
I can try...:)
Below is my .gdbinit (target's root fs is NFS mounted to /opt/FS_DVRM):

shell cp /Projects/CSU/BuildARM/debug/csu /opt/FS_DVRM/home/csu
set remote exec-file /home/csu
file /Projects/CSU/BuildARM/debug/csu
target extended-remote 192.168.50.4:44000
br main
r

Let's continue in private mails...
--
Leon
Kishore
2011-06-06 07:09:40 UTC
Permalink
Post by Niko Sams
The first workaround is needed because you use a gdb script (configured in
the launch configuration). If you use a gdb script kdevelop doesn't "file"
or "run" for you,
as you are supposed to do that in your script.
Is that a wrong assumption?
IMHO the only difference that should exist is the addition of "-x
/path/to/gdbinit" in the invocation of gdb.

But there could be some differences. Like in some cases after all the init
stuff, when working with arm bare metal code, gdb expect "continue" instead of
"run". That again is for actual hardware. However, when running on the arm
simulator, gdb expects "run"!

Ideally, gdbinit file should just do the init stuff and then let kdev setup the
breakpoints and stuff and then execute.

In my use with bare-metal code, I execute "gdb -x /path/to/gdbinit
/file/to/debug" to debug. In the gdbinit file I end it with the "load"
instruction and manually execute "c" (or "run" in case of a simulator) after
setting up the breakpoints as needed at the time.
--
Cheers!
Kishore
Leon Pollak
2011-06-06 07:56:49 UTC
Permalink
Post by Kishore
In my use with bare-metal code, I execute "gdb -x /path/to/gdbinit
/file/to/debug" to debug. In the gdbinit file I end it with the "load"
instruction and manually execute "c" (or "run" in case of a simulator)
after setting up the breakpoints as needed at the time.
I work with two different configurations: ARM box running linux (gdbserver)
and PowerPC box under Abatron BDI-2000.
The first case works after the patches/tricks I described.
I have a serious problem now with the second case, when breakpoints are not
set while in debugging, only at the beginning.

What do you mean by "after setting up the breakpoints as needed at the time"?
When and how do you set them?

Thanks.
--
Leon
Kishore
2011-06-06 15:02:54 UTC
Permalink
Post by Leon Pollak
Post by Kishore
In my use with bare-metal code, I execute "gdb -x /path/to/gdbinit
/file/to/debug" to debug. In the gdbinit file I end it with the "load"
instruction and manually execute "c" (or "run" in case of a simulator)
after setting up the breakpoints as needed at the time.
I work with two different configurations: ARM box running linux (gdbserver)
and PowerPC box under Abatron BDI-2000.
The first case works after the patches/tricks I described.
I have a serious problem now with the second case, when breakpoints are not
set while in debugging, only at the beginning.
What do you mean by "after setting up the breakpoints as needed at the
time"? When and how do you set them?
I was talking about using the gdb command line and not kdevelop. I was just
explaining my cmd line work flow. After executing "gdb -x /path/to/gdbinit
/file/to/debug" when i reach the gdb prompt execution still has not begun. Then
I add breakpoints ("br main") before executing "c" or "run".

Here is what i think kdevelop should do when using a gdbinit file.
- kdevelop executes "gdb -x /path/to/gdbinit /file/to/debug". The gdbinit
script itself should not execute "continue" or "run".
- Setup breakpoints, watchpoints etc.
- At the gdb prompt kdevelop executes "continue" or "run" (configurable?).

What i think is important here is that kdevelop gets some time after running
gdbinit so that it can add the breakpoints in its list.

I have not tried but i wonder if it is possible to add the breakpoints while
launching gdb with the option "-ex br main"
--
Cheers!
Kishore
Pauli Sundbreg
2011-06-03 08:51:32 UTC
Permalink
Hello,


I am not sure if this is completely unrelated but i have bit similar
issue with libtool and debugging shell.

The older version seemed to start kdevelop with "$shell $gdb
$file_to_debug" -- that works well with libtool, as i have understood
that libtool , when launched, changes $file_to_debug to be proper
$file_to_debug_accordingly_libtool.

However the new version passes the $file_to_debug in inside gdb as an
internal command, that makes using libtool as debugging shell useless --
it cannot change the $file_to_debug to
$file_to_debug_accordingly_libtool as it is passed inside gdb.

I shortly looked at the code but i found no quick solution so i just
accepted doing make install before debugging, though it certainly is not
the proper solution.


Cheers,
Pauli
Post by Timo
Dear List,
This is my first post on this list. I'm working for a small company in
Finland on mostly ARM-based embedded systems. I've been using KDevelop
as an IDE and debugging frontend from ancient times and I'm quite used
to it.
But there is a couple of quirks I would like to talk about.
<<<<
The debugger component encountered internal error while processing reply
from gdb. Please submit a bug report.
The exception is: MI type error
The MI response is: ^done
However, debugging works after that, mostly. I'll paste 'internal
commands' output later.
KDevelop seems not to tell GDB about the executable file to be debugged.
I have put it into the gdbinit file as a 'file' command but I think
KDevelop should take it from the 'Executable' field in the 'Launch
Configuration'. At least older versions did.
My breakpoints doesn't activate. I have to delete them altogether and
then set them again. In older versions of KDevelop it was enough to
disable and enable them during the session.
Am I doing something wrong, should I report these as bugs or wait for an
update?
=================
Version 4.0.0 (using KDevPlatform 1.0.0)
Using KDE Development Platform 4.4.5 (KDE 4.4.5)
On Ubuntu 10.04.2
==================
(gdb) -gdb-exit
(gdb) quit
^exit
/arm/sg-none-eabi/bin/arm-none-eabi-gdb --interpreter=mi2 -quiet
(gdb) -gdb-show version
GNU gdb (Sourcery G++ Lite 2011.03-42) 7.2.50.20100908-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=arm-none-eabi".
<https://support.codesourcery.com/GNUToolchain/>.
^done
(gdb) -gdb-set width 0
^done
(gdb) -gdb-set height 0
^done
(gdb) handle SIG32 pass nostop noprint
handle SIG32 pass nostop noprint
Signal Stop Print Pass to program Description
SIG32 No No Yes Real-time event 32
^done
(gdb) handle SIG41 pass nostop noprint
handle SIG41 pass nostop noprint
Signal Stop Print Pass to program Description
SIG41 No No Yes Real-time event 41
^done
(gdb) handle SIG42 pass nostop noprint
handle SIG42 pass nostop noprint
Signal Stop Print Pass to program Description
SIG42 No No Yes Real-time event 42
^done
(gdb) handle SIG43 pass nostop noprint
handle SIG43 pass nostop noprint
Signal Stop Print Pass to program Description
SIG43 No No Yes Real-time event 43
^done
(gdb) -enable-pretty-printing
^done
(gdb) source /usr/share/kde4/apps/kdevgdb/printers/gdbinit
source /usr/share/kde4/apps/kdevgdb/printers/gdbinit
/usr/share/kde4/apps/kdevgdb/printers/gdbinit:14: Error in sourced
Python scripting is not supported in this copy of GDB.
^error,msg="/usr/share/kde4/apps/kdevgdb/printers/gdbinit:14: Error in
sourced command file:\nPython scripting is not supported in this copy of
GDB."
(gdb) -inferior-tty-set /dev/pts/12
^done
(gdb) -environment-cd /home/timo/projects/ccd1100/boot/obj-arm-none-eabi
^done
(gdb) -gdb-set environment CROSS=arm-none-eabi
^done
(gdb) -gdb-set environment PATH=/arm/sg-none-eabi/bin:/usr/bin:/bin
^done
(gdb) -gdb-set print static-members off
^done
(gdb) -gdb-set print asm-demangle on
^done
(gdb) source /home/timo/projects/ccd1100/gdbinit
source /home/timo/projects/ccd1100/gdbinit
=thread-group-started,id="i1",pid="42000"
=thread-created,id="1",group-id="i1"
0x0000087c in ?? ()
*stopped,frame={addr="0x0000087c",func="??",args=[]},thread-id="1",stopped-threads="all"
(gdb) -thread-info
^done
warning: RMT ERROR : failed to get remote thread list.
^done,threads=[{id="1",target-id="Remote
target",frame={level="0",addr="0x0000087c",func="main",args=[{name="argc",value="<value
optimized out>"},{name="argv",value="<value optimized
out>"}],file="main.c",fullname="/home/timo/projects/ccd1100/boot/main.c",line="578"},state="stopped"}],current-thread-id="1"
(gdb) -break-list
^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=[]}
(gdb) -stack-list-frames --thread 1 0 21
^done,stack=[frame={level="0",addr="0x0000087c",func="main",file="main.c",fullname="/home/timo/projects/ccd1100/boot/main.c",line="578"}]
(gdb) -stack-list-locals --thread 1 --frame 0 --simple-values
^done,locals=[{name="c",type="int",value="<value optimized
out>"},{name="t",type="int",value="399002"},{name="i",type="unsigned
int",value="4294928992"},{name="ch",type="unsigned
int",value="0"},{name="inp",type="unsigned int",value="4194304"}]
(gdb) -var-update --thread 1 --frame 0 --all-values *
^done,changelist=[]
(gdb) -stack-list-arguments --thread 1 --frame 0 0 0 0
^done,stack-args=[frame={level="0",args=[name="argc",name="argv"]}]
^done,name="var83",numchild="0",value="<value optimized
out>",type="int",thread-id="1",has_more="0"
^done,name="var84",numchild="0",value="399002",type="int",thread-id="1",has_more="0"
^done,name="var85",numchild="0",value="4294928992",type="unsigned
int",thread-id="1",has_more="0"
^done,name="var86",numchild="0",value="0",type="unsigned
int",thread-id="1",has_more="0"
^done,name="var87",numchild="0",value="4194304",type="unsigned
int",thread-id="1",has_more="0"
^done,name="var88",numchild="0",value="<value optimized
out>",type="int",thread-id="1",has_more="0"
^done,name="var89",numchild="1",value="<value optimized out>",type="char
**",thread-id="1",has_more="0"
--
Timo
_______________________________________________
kdevelop mailing list
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop
Loading...