I premise I'm not a C expert...
I'm trying to modify some sources and I can't figure out what's the cause
of a crash...
If I could reduce the code I think I would isolate the problem...
but unfortunately I can not do it because it uses a parser created
automatically by yacc and a lexer created automatically by lex...
what do you think I can do to reduce the code?
As I was saying I'm not an expert and creating from scratch a parser and
lexer that could behave like that is beyond my possibilities...
|
|
0
|
|
|
|
Reply
|
Lorenzo
|
7/26/2003 2:39:01 PM |
|
Lorenzo Villari wrote:
>
> I premise I'm not a C expert...
> I'm trying to modify some sources and I can't figure out what's the cause
> of a crash...
>
> If I could reduce the code I think I would isolate the problem...
> but unfortunately I can not do it because it uses a parser created
> automatically by yacc and a lexer created automatically by lex...
> what do you think I can do to reduce the code?
>
> As I was saying I'm not an expert and creating from scratch a parser and
> lexer that could behave like that is beyond my possibilities...
You mention lex and yacc. When you compile you can add switches to the
lex and yacc lines that will automatically help you debug the code.
For lex I think it is -d.
man lex
man yacc
FYI: are you sure you are using lex (not flex) and yacc (not bison)?
flex and bison are the GNU replacements for lex/yacc.
--
http://ftp.opensysmon.com is a shell script archive site with an
open source system monitoring and network monitoring software package.
Many platforms are supplied already compiled.
|
|
0
|
|
|
|
Reply
|
scriptOmatic
|
7/26/2003 5:49:14 PM
|
|
> FYI: are you sure you are using lex (not flex) and yacc (not bison)?
>
In fact I'm using Flex and Bison...
|
|
0
|
|
|
|
Reply
|
Lorenzo
|
7/26/2003 6:33:06 PM
|
|
"Lorenzo Villari" <vlllnz@tiscali.it> wrote in message
news:9owUa.205681$lK4.5899873@twister1.libero.it...
> I premise I'm not a C expert...
> I'm trying to modify some sources and I can't figure out what's the cause
> of a crash...
You could compile with '-g' and then do a post-mortem debug with 'gdb'
on the core file. The exact options and program might be different on your
platform, but most UNIX machines provide a way to get detailed core dumps
and do a post-mortem analysis on them. This assumes the crash you are
referring to is a fatal crash that causes the program to stop executing.
DS
|
|
0
|
|
|
|
Reply
|
David
|
7/26/2003 8:05:13 PM
|
|