Forum Discussion
Altera_Forum
Honored Contributor
14 years agoNios II Debugger problem
When I try to debug the simple_socket_server app in Nios II SBT for Eclipse I get the following error:
.gdbinit: No such file or directory. Reading symbols from C:/NEEK_Qsys/Ethernet3/neek_ethernet_fred2_good50_Copy/software/NEEK_example_sss_flash/NEEK_example_sss_flash.elf...done. Stopped due to shared library event Can someone please explain what I am doing wrong?17 Replies
- Altera_Forum
Honored Contributor
Exactly my question too!!
The ".gdbinit: No such file or directory" message has been coming up for months, but never caused any problems. As of recently however, I also started getting "Stopped due to shared library event" during execution, and then the processor resets. Usually it does that several times before it finally executes the program to the end. Thinking it may have something to do with the debugger, I run the program in Release config, and it still does the resetting... - Altera_Forum
Honored Contributor
It's my problem too... The solve exists?
- Altera_Forum
Honored Contributor
I have the same problem! Any resolves?
- Altera_Forum
Honored Contributor
Try running Nios II Software Build Tools for Eclipse "as administrator" to see if that helps.
In Windows Start Menu, click on All Programs, then open the Altera folder. Select Nios II EDS 11.0sp1 (or whichever version you are running) then right-click on nios iisoftware build tools for eclipse and select run as administrator. Windows will probably ask you if this is OK, just say yes. The SBT will now have administrative privileges so sharing files will not be an issue. Good luck! - Altera_Forum
Honored Contributor
Thanks for the suggestion, but there was no change..
The problem is still there even if the the debugger is not in use, but in that case the cpu just hangs. With the debugger I get the error msg and it resets. - Altera_Forum
Honored Contributor
Is this a custom board or a development kit?
Have you been able to run any code on the Nios II? Are you using the Nios II Terminal to monitor the software? - Altera_Forum
Honored Contributor
It is a custom board.
Most code runs. The problem has been gradually more frequent until during software development until it could be considered more or less constant. Note that the break does not occur at a given point in time. It is random but often around the time of and IRQ event. The board has a serial interface with which a can see resets when the debugger issues the "Stopped due to shared library event" message. If the debugger is not attached the code just freezes. Since this seems to be a common problem (google) I was hoping there would be a "standard" fix. It feels like some area of memory is accessed in some erroneous manner. What library is referred to? - Altera_Forum
Honored Contributor
This is getting way out of my area of expertise. Perhaps someone else on the forum will chime in with more info.
I'm thinking your problem may be an issue with Eclipse rather than your design. I found this entry in the eclipse.org forum, which may shed some light on your situation: http://www.eclipse.org/forums/index.php/m/503935/ Good luck... - Altera_Forum
Honored Contributor
fheineman: Thanks for your help! Did the "Run as admin" solve your problem?
Ive seen some posts where the problem has gone away when people have edited thier .gdbinit file. However, I dont know how to edit it. What paths do I set? I am running the "Nios II 11.1 Software Build Tools for Eclipse" under Windows. But the paths Ive seen people use are Linux paths. Cygwin is installed together with Eclipse, perhaps the builds are done under a Linux environment? Is so to what files are one to point out with the paths, one might ask... postman,chnaideur: Are you still having the problem? If not, what solved it? - Altera_Forum
Honored Contributor
--- Quote Start --- Did the "Run as admin" solve your problem? --- Quote End --- NO! I gave up on that problem and stopped trying to use the debugger. I have to run my Nios II code out of external flash memory, so I can't really use the debugger anyway. Plus it just adds another layer of uncertainty (and aggravation) to the debugging process. Instead I insert printf() statements at key locations in the code to monitor the software. --- Quote Start --- Ive seen some posts where the problem has gone away when people have edited thier .gdbinit file. However, I dont know how to edit it. What paths do I set? --- Quote End --- I don't think you really need a .gdbinit file, but I don't know for sure.