Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] arm-elf-gcc simulator debugging works with Eclipse

Add the following commands to your .gdbinit file:

upload <full path of executable>  /<dir on target>/<name of executable>
run /<dir on target>/<name of executable>

I am not sure that this will work but give it a try.

----- Original Message -----
From: "Amit Aghara" <aaghara@xxxxxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Tuesday, May 06, 2003 3:30 PM
Subject: Re: [cdt-debug-dev] arm-elf-gcc simulator debugging works with
Eclipse


>
>
>
>
> I am in the process of analyzing CDT and its features and how well does it
> play with the target devices and environments. QNX just happens to be the
> first platform I have attempted to setup remote debugging on using
> Eclipse-CDT. I just wish to identify, if any, the technical difficulties
> which other developers may face while setting up Eclipse-CDT for remote
> debugging on their target devices, or what level of internal details does
> one need to know about Eclipse-CDT or their respective GDB environments
for
> a quick and easy setup.
>
> I like the concept of providing an open framework to support a broader
> range of target environments, but I think the integration of Eclipse-CDT
> with the supported default GDB's should be made as less painful as can be
> for first time users, or some documentation or tips on doing the same
could
> be very helpful. But that again is just my point of view.
>
> Coming back to my problem.....
> I discovered that my host environment passes its own respective path to
the
> app executable (for example, /cygdrive/c/<some path>/hello) to the target
> device to execute. And obviously that path is not valid on the target and
> it complains about the file not being found.
> Does anyone see something obviously wrong about what I am trying to
> accomplish here ? or if anybody has an alternate suggestion I would
> appreciate that too....:)
>
> btw...my Eclipse version is 2.1 and the latest version of CDT on top of
it.
>
>
> Regards,
>
> Amit Aghara
>
>
>
> |---------+------------------------------->
> |         |           Thomas Fletcher     |
> |         |           <thomasf@xxxxxxx>   |
> |         |           Sent by:            |
> |         |           cdt-debug-dev-admin@|
> |         |           eclipse.org         |
> |         |                               |
> |         |                               |
> |         |           05/05/2003 08:57 AM |
> |         |           Please respond to   |
> |         |           cdt-debug-dev       |
> |         |                               |
> |---------+------------------------------->
>
>---------------------------------------------------------------------------
------------------------------------|
>   |
|
>   |       To:       cdt-debug-dev@xxxxxxxxxxx
|
>   |       cc:
|
>   |       Subject:  Re: [cdt-debug-dev] arm-elf-gcc simulator debugging
works with Eclipse                        |
>   |
|
>
>---------------------------------------------------------------------------
------------------------------------|
>
>
>
>
>
> Amit Aghara wrote:
>
> >This is a remote debugging issue on a QNX Neutrino RTOS (version 6.2.1)
> >using Eclipse-CDT. I am just attempting to run and debug a simple hello
> >world sample.
> >
> Personally I would have to suggest that you opt for the QNX productized
> version of the CDT
> which includes all of the required components and more, properly
> configured and ready to go
> out of the box for you =;-)  This includes a proper debug plugin for the
> qnx remote protocol,
> target definition and connectivity and debug target agent.
>
> >The error which I get when I run debug on the application it gives me an
> >error saying "No such file found on target"
> >
> Then this would lead me to believe that that the file could not be found
> to launch on the remote
> target =;-)  How is the file being run over there?  For the QNX plugins
> we had to make some
> modifications to the default debug launcher to specialize it for the QNX
> environment which included
> being able to override the GDB run command.  I suspect that you are
> running into the same
> problems.
>
> Also note that the changes that you have made are non flexible in terms
> of allowing your
> environment to exist with others (ie an ntoarm debug agent) all in the
> same environment.
> The only real way to work around this (afaik) is to have your own debug
> plugin, which is
> of course exactly what the QNX product is.  If you have 6.2.1, then you
> should be
> able to have access to this.  If you don't ... well that is another
> conversation all together =;-)
>
> Thanks,
>   Thomas
>
> >My setup details are...
> >- using Eclipse 2.1 with the latest stable CDT builds from the CVS repos.
> >- my target RTOS is QNX Neutrino version 6.2.1 with a "ppc" processor
> which
> >uses the right level cross-compilers & GDB 5.2.1 under the covers
> >(ntoppc-gcc & ntoppc-gdb)
> >- my target is connected to my desktop via ethernet
> >
> >Here are the steps which I performed based on my reading from few of the
> >emails on remote debugging...
> >1) I modified the plugin.xml file under the org.eclipse.debug.mi.core
> >project. made the following change...
> >      <debugger
> >            platform="win32"
> >            name="%CygwinGDBDebugger.name"
> >            modes="run,core,attach"
> >            cpu="native,ppc"                        <--------------------
> >added "ppc" to the list of cpu's
> >            class="org.eclipse.cdt.debug.mi.core.CygwinGDBDebugger"
> >            id="org.eclipse.cdt.debug.mi.core.CygwinCDebugger">
> >      </debugger>
> >
> >This change made me get past the problem where I could atleast select a
> >debugger from my drop-down list in the debug configuraiton page.
(Actually
> >I just ended up adding "ppc" to all the 3 default debuggers
> >{CygwinGDBDebugger, GDBDebugger & GDBServerDebugger} to be able to try
all
> >options)
> >2) I created a command file (.gdbinit) with the following commands...
> >target qnx <ip address of target>:<port>
> >set qnxremotecwd /<application dir>
> >sym hello
> >
> >While debugging thru these plugins, I think it seems that it took the
> >command file and it attempts to start the GDB process with the following
> >command....
> ><specified path to GDB executable>\ntoppc-gdb.exe --cd=<absolute path to
> yr
> >project workspace> --command=<specified path to my .gdbinit
file>\.gdbinit
> >-q -nw -i -mi1 <absolute path to the program executable>\hello
> >for example,
C:\qnx\bin\ntoppc-gdb.exe --cd=C:\eclipse\workspace\MyProject
> >--command=C:\.gdbinit -q -nw -i -mi1 C:\eclipse\workspace\MyProject\hello
> >
> >
> >Am I missing any more steps to setting this up? or Am I doing something
> >completely wrong here? I hope I have provided enough info to understand
my
> >problem.
> >
> >Please advise, I appreciate all yr help. Thanks.
> >
> >Regards,
> >
> >Amit Aghara
> >
> >
> >
> >|---------+------------------------------->
> >|         |           "Alain Magloire"    |
> >|         |           <alain@xxxxxxx>     |
> >|         |           Sent by:            |
> >|         |           cdt-debug-dev-admin@|
> >|         |           eclipse.org         |
> >|         |                               |
> >|         |                               |
> >|         |           04/29/2003 05:52 PM |
> >|         |           Please respond to   |
> >|         |           cdt-debug-dev       |
> >|         |                               |
> >|---------+------------------------------->
> >
>
>---------------------------------------------------------------------------
------------------------------------|
>
> >  |
> |
> >  |       To:       cdt-debug-dev@xxxxxxxxxxx
> |
> >  |       cc:
> |
> >  |       Subject:  Re: [cdt-debug-dev] arm-elf-gcc simulator debugging
> works with Eclipse                        |
> >  |
> |
> >
>
>---------------------------------------------------------------------------
------------------------------------|
>
> >
> >
> >
> >
> >
> >
> >>Starting with =
> >>http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg01403.html,
> >>I was able to get the GCC ARM simulator to work.
> >>
> >>Neat!
> >>
> >>The only trick was that "info threads" causes GDB to crash=20
> >>before the app is up and running.
> >>
> >>
> >>After some frustrating hours, I figured out a workaround on=20
> >>gdb.ini as follows:
> >>
> >>
> >>target sim
> >>#info threads crashes GDB
> >>load
> >>break main
> >>run
> >>#info threads no longer crashes GDB
> >>
> >>
> >>The workaround is described at the end of this bug-report:
> >>
> >>http://bugs.eclipse.org/bugs/show_bug.cgi?id=3D37038
> >>
> >>
> >>
> >>- I've also fired off a bug-report to the GCC guys
> >>- I got GCJ compiled code up and running in the Eclipse debugger as =
> >>well.
> >>
> >>
> >>
> >
> >The crash is gdb related, you should probably send the PR to
> >the gdb mailing list with the backtrace.
> >
> >Glad to see things work out.
> >
> >Can I close the PR 8-)
> >
> >
> >_______________________________________________
> >cdt-debug-dev mailing list
> >cdt-debug-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> >
> >
> >_______________________________________________
> >cdt-debug-dev mailing list
> >cdt-debug-dev@xxxxxxxxxxx
> >http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> >
> >
>
>
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
>  http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>
>
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>



Back to the top