[ELDK] need to use GDB/MI commands with gdb provided by ELDK4.1.
Wolfgang Denk
wd at denx.de
Mon Jul 6 20:22:22 CEST 2009
Dear Diptopal Basu,
In message <bd97640b0907060340p63468cd6kaec28e2372b30eb5 at mail.gmail.com> you wrote:
>
> I am trying to automate GDB debugging so that I can debug an application in
> the lights out mode , the debug script will "test" the application using the
> gdb and log the information I need.. This is in the concept stages , but
> this is what I am planning to do .
I'm not sure that the MI commands will make scripting GDB much easier.
It is a _machine_ interface, and scripting is often more onvenient
when using the standard CLI.
Use standard tools like "expect" that were specifically created for
such purposes...
> I will give an example below of how I need the set upto be automated , this
> is assuming that the gdbserver on the target side is started with
> application nick_arm and listening to port 12345
>
> $ arm-linux-gdb nick_arm
>
> (gdb) set solib-absolute-prefix /home/dbasu/ELDK/arm/lib
> (gdb) set solib-search-path /home/dbasu/ELDK/arm/lib
> (gdb) target remote 10.99.104.56:12345
How about simply using .gdbrc ?
> I need to have these set of commands automated , this will be my set up
> script before I get into the actual automation , I thought GDB/MI interface
> is easier to automate hence I thought above commands need to be written in
> MI equivalent of CLI, but I may be wrong here .
I think the MI interface is not the right thing to use here. If I
were in your place, I'd use the standard CLI interface, put all
constant commands needed for initial setup in my .gdbrc file (and
define some convenient functions there), and then use "expect" to
automate the remaining parts. Been there and done that many, many
times before.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If I had to live my life again, I'd make the same mistakes, only
sooner. -- Tallulah Bankhead
More information about the eldk
mailing list