[PATCH][EXAMPLE] gdbserver embedded debugging in kdevelop

Roger Larsson roger.larsson at norran.net
Wed Jul 30 00:48:06 UTC 2003


Hi,

I have added some scripting features necessary for embedded debugging in 
kdevelop.

Linked is also a project that uses those features to debug over ssh on an
x86 using static libraries.
	http://w1.910.telia.com/~u91005870/hello-distclean.zip
	you will have to edit user and computer names...

Short description:
* After build the executable has to be transferred to the target.
  This is done in src/Makefile.am
	all: hello.remote
	hello.remote: hello
	        transfer-target.sh hello
  Note: transfer-target.sh also strips the executable.

* When pressing RUN button (>)
	* First a shell script "prepare-target.sh" (place in path) is executed that
	  uses ssh (could use rsh, serial terminal, etc.) to start the application
	  on the target - input and output are redirected. 

	* A user defined gdb script, "prepare-target.gdb", is run.
	  This connects to the target application.
	  and executes an optional "continue" to reach the first breakpoint.

* Additional feature
	* A gdb script run at init time (not tested)

Missing:
* GUI for configure options, see "hello.kdevelop" for manual configuration.

Problem:
* Timing between shell script and gdb script is tight...
* ./configure => "-g -O2", this leads to:
	* breakpoints might not work
	* confusing single stepping.

/RogerL

-- 
Roger Larsson
Skellefteå
Sweden


-------------- next part --------------
A non-text attachment was scrubbed...
Name: remote-kdevelop-R4.patch
Type: text/x-diff
Size: 4790 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20030730/8d9c9cc6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prepare-target.sh
Type: application/x-shellscript
Size: 260 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20030730/8d9c9cc6/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transfer-target.sh
Type: application/x-shellscript
Size: 1050 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20030730/8d9c9cc6/attachment-0001.sh>
-------------- next part --------------
target remote dox:2345
continue # optional...
-------------- next part --------------
target remote dox:2345
continue # optional...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello.kdevelop
Type: application/x-kdevelop
Size: 4534 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20030730/8d9c9cc6/attachment-0001.bin>


More information about the KDevelop-devel mailing list