On X86_64, take the followings to reproduce the bug: 1) compile the attached .c file into executable program 2) run the above executable progam 3) start up FryskGui and choose the "Debug an Existing Process" in "Frysk Startup Manager" 4) Click the "Click Here to Select a Process" and choose the program started at the step 2) then, you will get a lot of exception like the following and GUI will give no response. java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(libgcj.so.7) at frysk.dom.cparser.CDTParser$ParserCallBack.enterInclusion(FryskGui) at org.eclipse.cdt.internal.core.parser.scanner2.ScannerCallbackManager.popCallbacks(FryskGui) at org.eclipse.cdt.internal.core.parser.scanner2.Scanner2.beforeSecondFetchToken(FryskGui) at org.eclipse.cdt.internal.core.parser.scanner2.BaseScanner.nextToken(FryskGui) at org.eclipse.cdt.internal.core.parser.Parser.fetchToken(FryskGui) at org.eclipse.cdt.internal.core.parser.Parser.LA(FryskGui) at org.eclipse.cdt.internal.core.parser.Parser.LT(FryskGui) at org.eclipse.cdt.internal.core.parser.Parser.errorHandling(FryskGui) at org.eclipse.cdt.internal.core.parser.Parser.failParseWithErrorHandling(FryskGui) at org.eclipse.cdt.internal.core.parser.Parser.translationUnit(FryskGui) at org.eclipse.cdt.internal.core.parser.Parser.parse(FryskGui) at frysk.dom.cparser.CDTParser.parse(FryskGui) at frysk.dom.DOMFactory.createDOM(FryskGui) at frysk.gui.srcwin.SourceWindowFactory.finishSourceWin(FryskGui) at frysk.gui.srcwin.SourceWindowFactory$2.run(FryskGui) at org.gnu.glib.CustomEvents.runEvents(libgtkjava-2.8.so) at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so) at frysk.gui.Gui.gui(FryskGui) at frysk.gui.FryskGui.main(FryskGui)
Created attachment 1385 [details] the test case for this bug. Compile the program through: gcc -g -o daemon daemon.c
This has been fixed in the current CVS head. It turns out there are multiple versions of unistd.h and it was trying to get added to the DOM multiple times. A check added in enterInclusion in CDTParser.java has fixed this.