[ELDK] need to use GDB/MI commands with gdb provided by ELDK4.1.

Diptopal Basu diptopal.basu at gmail.com
Mon Jul 6 12:40:28 CEST 2009


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 .

     > Write some scripts may be in shell or otherwise ( I heard of a Tk
module called GDBMI ) which will be automatically able to communicate with
the gdb server running on the target and run commands . and capture data .

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

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 .

Please comment .

Regards
Diptopal



On Mon, Jul 6, 2009 at 2:13 PM, Wolfgang Denk <wd at denx.de> wrote:

> Dear Diptopal Basu,
>
> In message <bd97640b0907060048y551f0a82l3e17550f9ce5af61 at mail.gmail.com>
> you wrote:
> >
> >  I need to enable GDB/MI commands with ELDK 4.1 debigger for ARM , I am
>
> Could you please explain what exactly you have in mind with using the
> GDB/MI interface?
>
> > [root at localhost Desktop]# arm-linux-gdb nick_arm
> ...
> > (gdb) -break-insert main
> > Undefined command: "-break-insert".  Try "help".
>
> You are talking to GDB's  command  line  interface  here  (CLI,  also
> called  console interpreter), which is the default interface for GDB.
>
> You cannot use GDB/MI commands when talking to the CLI interface.  To
> do  that,  you  must start GDB with the machine interface interpreter
> (or  GDB/MI)  by  specifying  the  `-i'  or  `--interpreter'  startup
> options. Please read the GDB manual for details.
>
> Try something like
>
>        arm-linux-gdb --interpreter mi nick_arm
>
>
>
> 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
> To know how another being, another creature feels -  that  is  impos-
> sible.                  - Terry Pratchett, _The Dark Side of the Sun_
>


More information about the eldk mailing list