OpenCores
Issue List
or1ksim-0.3.0 RSP server crash with ELF file specified #83
Closed julius opened this issue about 14 years ago
julius commented about 14 years ago

I notice that or1ksim-0.3.0 crashes when it's configured to start the RSP server, as well as load an ELF specified on the command line, and is then connected to by GDB.

or1ksim outputs this: Listening for RSP on port 50001 I then connect with GDB Warning: Failed to accept RSP client ERROR: Cannot bind to RSP socket or1ksim exits

A bit of a debug, a google, and then a quick test, it appears the accept() function is strict about the third argument to it (a pointer to socket address length variable) should be initialised to a positive value.

Adding this just after len is declared appeared to fix the issue.

len= sizeof(socklen_t); // Fix accept() error

julius commented about 14 years ago

Sorry, I forgot to say this is in the rsp_get_client() function in debug/rsp-server.c

jeremybennett commented about 14 years ago
<p> Hi Julius, </p> <p> Thanks for the bug report and fix. We'll roll this into the next release. </p> <p> Jeremy </p> <p> -- <br /> Tel: +44 (1590) 610184<br /> Cell: +44 (7970) 676050<br /> SkypeID: jeremybennett<br /> Email: <a href="mailto:jeremy.bennett@embecosm.com">jeremy.bennett@embecosm.com</a><br /> Web: <a href="http://www.embecosm.com">www.embecosm.com</a> </p>
jeremybennett was assigned about 14 years ago
jeremybennett commented almost 14 years ago
<p> Added to SVN. Marking closed. </p> <p> Jeremy </p> <p> -- <br /> Tel: +44 (1590) 610184<br /> Cell: +44 (7970) 676050<br /> SkypeID: jeremybennett<br /> Email: <a href="mailto:jeremy.bennett@embecosm.com">jeremy.bennett@embecosm.com</a><br /> Web: <a href="http://www.embecosm.com">www.embecosm.com</a> </p>
jeremybennett closed this almost 14 years ago

Assignee
jeremybennett
Labels
Bug