Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » SPARC Simulator + GDB + CDT + Eclipse
SPARC Simulator + GDB + CDT + Eclipse [message #159475] Wed, 30 November 2005 12:29 Go to next message
Eclipse UserFriend
Originally posted by: fabricio.dea.inpe.br

Hi all,

After a lot of help from Norbert and Mikhail I could put GDB to work with
my development board, using the Zylin plugin
(http://www.zylin.com/embeddedcdt.html).

However, I have to do the same with the SPARC Instruction Simulator (SIS),
as we have just one board and some developers (it's an ERC32 processor, a
very expensive one) to work with it.

When starting a debug session on the real processor everything works fine.
But when trying to do the same with SIS, there's no answer to the last GDB
command, "run".

I can debug the simulator directly from the command line, and even using
the DDD graphical interface to GDB. But not with Eclipse / CDT.

I ran gdb from Eclipse and from the command line (with "interpreter=mi"),
and there's some differences between the sessions.

(A session with Eclipse)
[...]
[1.132.204.637.358] (gdb)
[1.132.204.641.145] 7 tar sim
[1.132.204.641.162] &"tar sim\n"
[1.132.204.641.165] ~"Connected to the simulator.\n"
[1.132.204.641.190] 7^done
[1.132.204.641.193] 8 load
[1.132.204.641.194] (gdb) [1.132.204.641.227] &"load\n"
[1.132.204.641.249] 8^done
[1.132.204.641.252] 9 break Init
[1.132.204.641.253] (gdb) [1.132.204.641.280] &"break Init\n"
[1.132.204.641.318] 9^done
[1.132.204.641.325] 10 run
[1.132.204.641.328] (gdb) [1.132.204.641.344] &"run\n"
(and there's no other message)

(A command-line session)
(gdb)
tar sim
&"tar sim\n"
~"Connected to the simulator.\n"
^done
(gdb)
load
&"load\n"
^done
(gdb)
break Init
&"break Init\n"
^done
(gdb)
run
&"run\n"
^done,reason="breakpoint-hit",bkptno="1",thread-id="0",
frame={addr="0x02001210",func="Init",args=[{name="ignored ",value="0"}],
file="hello.c",line="13"}
(gdb)

As you can see, from the command line we know that the breakpoint was hit,
but not from Eclipse. What can be happening?

Thanks in advance,


Fabrício.
Re: SPARC Simulator + GDB + CDT + Eclipse [message #159513 is a reply to message #159475] Wed, 30 November 2005 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

Do you use .gdbinit in your session?
The output order looks confusing. I don't know is this is a reason or not.
Otherwise it seems that gdb doesn't stop at the breakpoint. What happens if
yoy try to suspend the target?

""Fabr
Re: SPARC Simulator + GDB + CDT + Eclipse [message #159668 is a reply to message #159513] Thu, 01 December 2005 07:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fabricio.dea.inpe.br

Mikhail,


Thanks for your answer. Yes, I use a .gdbinit file, with the following
contents:

target sim
load
break Init
run

But the output order is exactly the same as the order of commands in
gdbinit.

I know that gdb stops at the breakpoint. When running directly from the
command line, the breakpoint is hit and I can continue debugging normally.
I tried this with and without "--interpreter=mi", and both are ok from the
command line interface.

But this works inside Eclipse, when debugging the real processor. It
appears that Eclipse is waiting for some answer that come from the target
(the progress dialog stops and Cancel button didn't work), but not from
the simulator. Is is possible?

Thanks,


Fabrício.


Mikhail Khodjaiants wrote:

> Do you use .gdbinit in your session?
> The output order looks confusing. I don't know is this is a reason or not.
> Otherwise it seems that gdb doesn't stop at the breakpoint. What happens if
> yoy try to suspend the target?
Re: SPARC Simulator + GDB + CDT + Eclipse [message #159781 is a reply to message #159668] Thu, 01 December 2005 14:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

> It appears that Eclipse is waiting for some answer that come from the
> target (the progress dialog stops and Cancel button didn't work), but not
> from the simulator. Is is possible?

The CDT debugger communicates only with gdb. The "run" command is sent to
gdb and it is waiting for the reply from gdb.
Check the .log file. Maybe there is something that can help.

""Fabr
Re: SPARC Simulator + GDB + CDT + Eclipse [message #159798 is a reply to message #159781] Fri, 02 December 2005 13:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fabricio.dea.inpe.br

Mikhail Khodjaiants wrote:

>> It appears that Eclipse is waiting for some answer that come from the
>> target (the progress dialog stops and Cancel button didn't work), but not
>> from the simulator. Is is possible?

> The CDT debugger communicates only with gdb. The "run" command is sent to
> gdb and it is waiting for the reply from gdb.
> Check the .log file. Maybe there is something that can help.

What ".log file" is this? I ran Eclipse in debug mode, and the result is
the same I posted here:
http://www.eclipse.org/newsportal/article.php?id=9071&gr oup=eclipse.tools.cdt#9071

Is this .log you're talking about?
Re: SPARC Simulator + GDB + CDT + Eclipse [message #159805 is a reply to message #159798] Fri, 02 December 2005 13:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

The ".log" is in the <your workspace>/.metadata directory.

""Fabr
Re: SPARC Simulator + GDB + CDT + Eclipse [message #159925 is a reply to message #159805] Mon, 05 December 2005 12:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fabricio.nk.uol.com.br

Mikhail,


I found the .log file, but there's nothing about the sessions in which I
try to run the simulator. These sessions appear simply not to have errors
(the file is not empty, just there are no reference to the sessions when I
tried to run the simulator).

Another info: GDB MI timeout is set to 30000ms; why didn't the timeout
happen, if there's no answer after the run command?

Best Regards,


Fabrício.



Mikhail Khodjaiants wrote:

> The ".log" is in the <your workspace>/.metadata directory.

> ""Fabrício" de Novaes Kucinskis" <fabricio@dea.inpe.br> wrote in message
> news:e72c19a1c31db0fb393dc2e79ec5be08$1@www.eclipse.org...
>> Mikhail Khodjaiants wrote:
>>
>>>> It appears that Eclipse is waiting for some answer that come from the
>>>> target (the progress dialog stops and Cancel button didn't work), but
>>>> not from the simulator. Is is possible?
>>
>>> The CDT debugger communicates only with gdb. The "run" command is sent to
>>> gdb and it is waiting for the reply from gdb.
>>> Check the .log file. Maybe there is something that can help.
>>
>> What ".log file" is this? I ran Eclipse in debug mode, and the result is
>> the same I posted here:
>>
http://www.eclipse.org/newsportal/article.php?id=9071&gr oup=eclipse.tools.cdt#9071
>>
>> Is this .log you're talking about?
>>
Re: SPARC Simulator + GDB + CDT + Eclipse [message #159933 is a reply to message #159925] Mon, 05 December 2005 13:51 Go to previous message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

Fabr
Previous Topic:How to link static libraries?
Next Topic:debug perspective don't display variables and cannot watch some expressions
Goto Forum:
  


Current Time: Wed Jul 09 23:14:20 EDT 2025

Powered by FUDForum. Page generated in 0.27044 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top