Remote, embedded debugging

Pauli Sundbreg pauli.sundberg at iki.fi
Fri Jun 3 09:51:32 BST 2011


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

On 06/03/2011 09:20 AM, Timo wrote:
> 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
> 
> _______________________________________________
> kdevelop mailing list
> kdevelop at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop





More information about the KDevelop mailing list