Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-17-2004, 05:33 AM   #1
Registered: Nov 2004
Location: oklahoma
Distribution: slackware 9.0
Posts: 98

Rep: Reputation: 15
Unhappy small programs dont work

I have been working on building an ALGOL compiler for myself, buit when I try to debug the code generated by FLEX, I get SIGERRs before execution.

OK LD is deprcated? GCC -O test lex.yy.o -lc

Now the GDB works sort - of :

the code passes in my datafile, calls yylex --

Acres and Acrds of working code So I say : continue

SIGERR filenno_unlocked

I dont understand what is broken nor now to fix it.
fileno_unlocked is not suppose to generate an error.
REMEMBER this is in the code for flex. And the source has 20 lines of text.

The software is unassuming. Maybe I need to do somthing but I do not know what that might be.

Has anyone ELSE ever seen this probelm.?
Old 11-17-2004, 06:46 AM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
gdb will produce very interesting results if you use it to debug optimised code. The reason for this is that the optimiser reshuffles your code, removes bits of it, inlines loops and various other issues. So the binary code doesn't map exactly onto its source code; gdb just follows the binary.

Take out the -O, and try using -g instead (which adds symbol information to the executable). You should then be able to debug much more easily.

If fileno_unlocked is generating an error, then the most likely explanation is that fileno_unlocked is being used incorrectly, contains a bug, or uses something else that contains a bug.

Hope that helps,

—Robert J. Lee
Old 11-18-2004, 07:28 AM   #3
Registered: Nov 2004
Location: oklahoma
Distribution: slackware 9.0
Posts: 98

Original Poster
Rep: Reputation: 15
re :small programs dont work

The thought was good but I am not runing an optimizing compile/ I am linking with gcc -o test lex.yy.o -lc

This should be a good command line to link a compiled unit. to compile it gcc - g -c lex.yy.c

Then go get SIGERR fileno_unlocked

this is not a proper error. I do not understand what is happening and I need to to know how to fix it.

I am building a compiler. the first step is to build a tokenizer.... I cant even get it to process enough to fix the logic falults. ; It is clear that large projects compile and execute nicely.

So I am doing something wrong or leaving something out.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
programs dont start davidleroux1 Mandriva 3 11-20-2005 09:20 PM
programs dont show up on toolbar buffed317 Fedora 1 12-08-2004 06:19 PM
Mandrake 9.2 Programs... all gone? Where did they go? Really I dont know 1beb Linux - Software 16 12-04-2003 01:39 AM
certain programs dont run brian0918 Linux - Software 6 04-05-2003 03:41 PM
Things dont work when you dont understand withoutaclue Linux - Newbie 3 03-12-2003 09:51 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration