Re: [cc65] New version of debug info available

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2011-08-21 14:03:57
Hi!

On Sun, Aug 21, 2011 at 11:42:26AM +0300, thefox xofeht wrote:
> test1.s (I added line numbers so it's easier to read):
>
> 001  .code
> 002  .macro foo
> 003      nop
> 004  .endmacro
> 005  .macro bar
> 006      lda #123
> 007      foo
> 008  .endmacro
> 009  bar
[...]
> As you can see, there's a normal line info for line 9 (id = 3). Line 6
> (id = 1) has a nesting count of 1. Line 7 however has a nesting count
> of 2. I'd expect this to be 1 as well.

The nesting counter is not per macro but globally (I think I haven't made that
very clear in my comments in the debug info file and maybe the wiki).

In the case above, the main program expands a macro "bar", which expands a
macro "foo". So the former has a count of 1 and the latter one of 2.

This is nice for a debugger, because you can tell from the count how the
macros were actually nested. A user may up and down like in a call stack (if
implemented).

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Aug 21 14:04:10 2011

This archive was generated by hypermail 2.1.8 : 2011-08-21 14:04:13 CEST