Problem starting trace experiment with gdb and TSIM-LEON3

Sat Sep 13 15:50:00 GMT 2008


I've tried to use the GDB Tracepoint Feature.
I'm using:
- sparc-rtems-gdb for debugging my program
- tsim-leon3 simulator from Gaisler Research as the remote target
And I'm getting this error message:
"Trace can only be run on remote targets."

A little more explanation of how I do it:

1/ The tsim-leon3 user manual says for the command "hist":
"hist [length]: Enable the instruction trace buffer. The length last executed
instructions will be placed in the trace buffer. A hist command without length
will display the trace  buffer. Specifying a zero trace length will disable the
trace buffer."
=> So I understand that tsim-leon3 know how to collect trace data, am I right?

2/ So here's what I run on the 1st terminal (enabling instruction trace buffer
on the remote target):


 This TSIM evaluation version will expire February 1, 2009

 TSIM/LEON3 SPARC simulator, version 2.0.10b (evaluation version)

 Copyright (C) 2001, Gaisler Research - all rights reserved.
 This software may only be used with a valid license.
 For latest updates, go to
 Comments or bug-reports to

serial port A on stdin/stdout
allocated 4096 K RAM memory, in 1 bank(s)
allocated 16 M SDRAM memory, in 1 bank
allocated 2048 K ROM memory
icache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
dcache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
tsim> hist 100
trace history length = 100
tsim> gdb
gdb interface: using port 1234

3/ Here's how I try to start the trace experiment with gdb (connecting to the
remote target, and starting the trace experiment):

$/opt/rtems-4.6/bin/sparc-rtems-gdb rtems-tasks
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-rtems"...
(gdb) target extended-remote localhost:1234
Remote debugging using localhost:1234
0x00000000 in ?? ()

(gdb) load
Loading section .text, size 0x1c1f0 lma 0x40000000
Loading section .data, size 0xac0 lma 0x4001c1f0
Start address 0x40000000, load size 117936
Transfer rate: 943488 bits/sec, 278 bytes/write.

(gdb) trace Test_task
Tracepoint 1 at 0x400013a4: file rtems-tasks.c, line 183.

(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
> collect time.second
> collect task_index
> collect Task_name[task_index]
> collect &time
> end

(gdb) tstart
Trace can only be run on remote targets.

=> I am already connected to the remote target, so what is the problem then???
Any help would be greatly appreciated.



More information about the Gdb mailing list