Discussion:
[OpenRISC] [or1ksim] problem when remote target GDB to or1ksim
Hesham Moustafa
2014-05-03 21:01:51 UTC
Permalink
Hi,

I have installed the latest or1k-elf-* from github repo. There are
some problems when I try to connect GDB to or1ksim using "target
remote :xxxxx" from GDB.

First, the problem with latest github repo is that when I run or1ksim,
and try to connect GDB to it, I got the following error form or1ksim
and connection is closed immediately:

"WARNING: Test with id 6f7070755371242b not registered. Ignoring." from or1ksim

and

"Remote communication error. Target disconnected.: Connection reset
by peer." from GDB.

Another when installing or1ksim from cvs, is:

"Unable to set flags for vapi socket 7 to value 0x00007fff: Invalid argument"

And the same for GDB.

What are the problems? And how it can be solved?

Regards,
Hesham
Stefan Kristiansson
2014-05-04 09:44:43 UTC
Permalink
On Sun, May 4, 2014 at 12:01 AM, Hesham Moustafa
Post by Hesham Moustafa
Hi,
I have installed the latest or1k-elf-* from github repo. There are
some problems when I try to connect GDB to or1ksim using "target
remote :xxxxx" from GDB.
First, the problem with latest github repo is that when I run or1ksim,
and try to connect GDB to it, I got the following error form or1ksim
"WARNING: Test with id 6f7070755371242b not registered. Ignoring." from or1ksim
and
"Remote communication error. Target disconnected.: Connection reset
by peer." from GDB.
"Unable to set flags for vapi socket 7 to value 0x00007fff: Invalid argument"
And the same for GDB.
What are the problems? And how it can be solved?
I tested the latest or1ksim from the or1k-master branch, and I can't
reproduce the problem here.
How did you invoke or1ksim?
This is how I did it (including the output from when I connect to it from gdb):
---
$ sim --srv=55555 -f arch/openrisc/or1ksim.cfg
Seeding random generator with value 0x14bfc34f
Insn MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Data MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Ethernet TAP type
Warning: ./arch/openrisc/or1ksim.cfg: Unrecognized parameter: sockif
at line 713; ignored.
Verbose on, simdebug off, interactive prompt off
Machine initialization...
Clock cycle: 10ns
No data cache.
No instruction cache.
BPB simulation off.
BTIC simulation off.
Or1ksim 2012-04-27
Building automata... done, num uncovered: 0/215.
Parsing operands data... done.
UART at 0x90000000
Resetting Tick Timer.
Resetting Power Management.
Resetting PIC.
Starting at 0x00000000
Listening for RSP on port 55555
Remote debugging from host 0.0.0.0
---

Stefan
Hesham Moustafa
2014-05-08 12:38:31 UTC
Permalink
Hi Stefan,

I invoke or1ksim with "sim -f sim.cfg", sim.cfg is attached. The
result I got from or1ksim is the following:

[***@localhost ~]$ or32-elf-sim -f sim.cfg
Seeding random generator with value 0xd740c73e
Warning: ./sim.cfg: Unrecognized parameter: gdb_enabled at line 89; ignored.
Warning: ./sim.cfg: Unrecognized parameter: server_port at line 90; ignored.
Or1ksim 2012-04-27
Building automata... done, num uncovered: 0/215.
Parsing operands data... done.
Resetting memory controller.
Resetting PIC.
WARNING: sim_init: verbose forced on by debug
VAPI Server started on port 50000
VAPI started, waiting for clients
All devices connected
Unable to set flags for vapi socket 8 to value 0x00007fff: Invalid argument

On Sun, May 4, 2014 at 11:44 AM, Stefan Kristiansson
Post by Stefan Kristiansson
On Sun, May 4, 2014 at 12:01 AM, Hesham Moustafa
Post by Hesham Moustafa
Hi,
I have installed the latest or1k-elf-* from github repo. There are
some problems when I try to connect GDB to or1ksim using "target
remote :xxxxx" from GDB.
First, the problem with latest github repo is that when I run or1ksim,
and try to connect GDB to it, I got the following error form or1ksim
"WARNING: Test with id 6f7070755371242b not registered. Ignoring." from or1ksim
and
"Remote communication error. Target disconnected.: Connection reset
by peer." from GDB.
"Unable to set flags for vapi socket 7 to value 0x00007fff: Invalid argument"
And the same for GDB.
What are the problems? And how it can be solved?
I tested the latest or1ksim from the or1k-master branch, and I can't
reproduce the problem here.
How did you invoke or1ksim?
---
$ sim --srv=55555 -f arch/openrisc/or1ksim.cfg
Seeding random generator with value 0x14bfc34f
Insn MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Data MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Ethernet TAP type
Warning: ./arch/openrisc/or1ksim.cfg: Unrecognized parameter: sockif
at line 713; ignored.
Verbose on, simdebug off, interactive prompt off
Machine initialization...
Clock cycle: 10ns
No data cache.
No instruction cache.
BPB simulation off.
BTIC simulation off.
Or1ksim 2012-04-27
Building automata... done, num uncovered: 0/215.
Parsing operands data... done.
UART at 0x90000000
Resetting Tick Timer.
Resetting Power Management.
Resetting PIC.
Starting at 0x00000000
Listening for RSP on port 55555
Remote debugging from host 0.0.0.0
---
Stefan
Stefan Kristiansson
2014-05-08 13:01:59 UTC
Permalink
On Thu, May 8, 2014 at 3:38 PM, Hesham Moustafa
Post by Hesham Moustafa
Hi Stefan,
I invoke or1ksim with "sim -f sim.cfg", sim.cfg is attached. The
Seeding random generator with value 0xd740c73e
Warning: ./sim.cfg: Unrecognized parameter: gdb_enabled at line 89; ignored.
Warning: ./sim.cfg: Unrecognized parameter: server_port at line 90; ignored.
Or1ksim 2012-04-27
Building automata... done, num uncovered: 0/215.
Parsing operands data... done.
Resetting memory controller.
Resetting PIC.
WARNING: sim_init: verbose forced on by debug
VAPI Server started on port 50000
VAPI started, waiting for clients
All devices connected
Unable to set flags for vapi socket 8 to value 0x00007fff: Invalid argument
the debug section in the or1ksim.cfg file I used
(http://git.openrisc.net/cgit.cgi/jonas/linux/tree/arch/openrisc/or1ksim.cfg)
looks like this

section debug
enabled = 0
/* gdb_enabled = 0 */
/* server_port = 9999*/
rsp_enabled = 1
rsp_port = 50001
end

also note that I explicitly used --srv=55555 on the commandline in my example.

Stefan
Hesham Moustafa
2014-05-08 13:09:13 UTC
Permalink
Great. The problem was about the rsp_* parameters which were missing.
Now it works.
Thanks Stefan!

On Thu, May 8, 2014 at 3:01 PM, Stefan Kristiansson
Post by Stefan Kristiansson
On Thu, May 8, 2014 at 3:38 PM, Hesham Moustafa
Post by Hesham Moustafa
Hi Stefan,
I invoke or1ksim with "sim -f sim.cfg", sim.cfg is attached. The
Seeding random generator with value 0xd740c73e
Warning: ./sim.cfg: Unrecognized parameter: gdb_enabled at line 89; ignored.
Warning: ./sim.cfg: Unrecognized parameter: server_port at line 90; ignored.
Or1ksim 2012-04-27
Building automata... done, num uncovered: 0/215.
Parsing operands data... done.
Resetting memory controller.
Resetting PIC.
WARNING: sim_init: verbose forced on by debug
VAPI Server started on port 50000
VAPI started, waiting for clients
All devices connected
Unable to set flags for vapi socket 8 to value 0x00007fff: Invalid argument
the debug section in the or1ksim.cfg file I used
(http://git.openrisc.net/cgit.cgi/jonas/linux/tree/arch/openrisc/or1ksim.cfg)
looks like this
section debug
enabled = 0
/* gdb_enabled = 0 */
/* server_port = 9999*/
rsp_enabled = 1
rsp_port = 50001
end
also note that I explicitly used --srv=55555 on the commandline in my example.
Stefan
Loading...