Dead code in winedbg

Francois Gouget fgouget at free.fr
Thu Jan 15 08:08:52 CST 2009


On Wed, 14 Jan 2009, Eric Pouech wrote:

> Francois Gouget a écrit :
> > Hi,
> >
> > I have noticed that expr_alloc_uconstant() is unused in winedbg.
> > Is that normal?
> >   
> 
> the main point is that the lexer only returns signed integers, while it 
> should return both signed and unsigned integers

Actually, as far as I can tell, the lexer can only match unsigned 
integers:

DIGIT	   [0-9]
HEXDIGIT   [0-9a-fA-F]
"0x"{HEXDIGIT}+    { sscanf(yytext, "%x", &dbg_lval.integer); return tNUM; }
{DIGIT}+           { sscanf(yytext, "%d", &dbg_lval.integer); return tNUM; }

Both 'regexps' only match unsigned integers. And yet they are scanned 
with %d instead of %u. And then this continues in the grammar:

      tNUM                      { $$ = expr_alloc_sconstant($1); }

So maybe we should treat all these as unsigned, use 
expr_alloc_uconstant(), and then it is expr_alloc_sconstant() that would 
be unused?

Or should we really accept negative integers in the lexer?


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
  Nouvelle version : les anciens bogues ont été remplacés par de nouveaux.


More information about the wine-devel mailing list