gnupic: gpasm-0.9.0


Previous by date: 30 Jan 2001 16:16:59 -0000 gpasm-0.9.0, John Duncan
Next by date: 30 Jan 2001 16:16:59 -0000 Adding a new Programmer to the GNUPIC website., Jeethu Rao
Previous in thread: 30 Jan 2001 16:16:59 -0000 gpasm-0.9.0, John Duncan
Next in thread: 30 Jan 2001 16:16:59 -0000 Re: gpasm-0.9.0, Nestor A. Marchesini

Subject: Re: gpasm-0.9.0
From: Scott Dattalo ####@####.####
Date: 30 Jan 2001 16:16:59 -0000
Message-Id: <Pine.LNX.4.21.0101300905520.19469-100000@tempest2.blackhat.net>


On Tue, 30 Jan 2001, John Duncan wrote:

> Hello,
> 
> I have downloaded and installed gpasm-0.9.0.  I though that I would have
> a play with it to have a look at the error messages that it generates. 
> When it came across a line that had a goto statement with a label
> argument that had not been defined, it produced an error message like
> this.
> 
> Error hextest.asm 13 : 157 maybe_evaluateCan't evaluate expression
> 
> Anyone have any ideas where the 'maybe_evaluate' sneaks in??


Yes.
Line 362 of opcode.c is responsible for printing the message:

    gperror(GPE_UNKNOWN, __FUNCTION__"Can't evaluate expression");

The __FUNCTION__ evaluates to a string containing the function name. In this
case, the function name is maybe_evaluate. If you remove '__FUNCTION__' then
the maybe_evaluate string will go away. This is an artifact of some debugging
code one of us left in.

BTW, in gcc (and maybe other compilers) the two macros: __LINE__ and
__FUNCTION__ are extremely useful for diagnosing program flow. I more often
than not use these during debugging instead of gdb (or in my case ddd or the
emacs debugger).

Scott


Previous by date: 30 Jan 2001 16:16:59 -0000 gpasm-0.9.0, John Duncan
Next by date: 30 Jan 2001 16:16:59 -0000 Adding a new Programmer to the GNUPIC website., Jeethu Rao
Previous in thread: 30 Jan 2001 16:16:59 -0000 gpasm-0.9.0, John Duncan
Next in thread: 30 Jan 2001 16:16:59 -0000 Re: gpasm-0.9.0, Nestor A. Marchesini


Powered by ezmlm-browse 0.20.