[cc65] New version of debug info available

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2011-08-19 14:48:52
As some may have noticed, I have worked on improvements of debug information
in the last few weeks.

I've now reached a milestone, where things are still somewhat incomplete, but
the new code is useful enough to be shown to and tested by a wider audience.

The most exciting news is probably that a lot more information is now
available. This includes a complete list of scopes (including structures and
enums) together with their relations. This means that a program can ask for
all scopes in a module, parent and child scope relations, the ranges a scope
occupies in the different segments and so on.

Symbol information has been improved, too. It is possible to lookup the parent
symbol for a cheap local label, the scope a symbol is in, and the list of
symbols in a scope. For each symbol, the point of definition and all points of
reference in the sources can be retrieved. Imports and exports can be
identified and it is possible to lookup the export that corresponds to an
import, or the vice versa.

The list of modules (= object files) is available, and for each module the
list of source files, the main scope and other information can be retrieved.

The bad thing is that both, the format of the debug info file and the API has
changed. This means that you cannot read older debug info files with this
version of the dbginfo module. The API is now heavily based on ids, which can
be thought of as a primary index for each type of item. Most lookups are now
really fast (which does not mean that they were slow before:-). Especially
lookup by id is just an array access.

What is missing:

  * Spans for modules: Lookup which part of a segment comes from which module.
    This is a minor addition that will probably come soon.

  * More debug information from C sources. This is something bigger and may
    take additional time.

The old dbgtest program is gone and has been replaced by what I call "debug
info shell". It allows to interactively load a debug info file and dig around
in the supplied information. It is somewhat incomplete and docs are missing
but you may find it helpful.

Regarding documentation: I have started to add something to the Wiki but as
everyone knows docs have low priority because no one reads them anyway:-) I
will nevertheless try to add something useful here over the weekend.

A new snapshot has been created while I have been writing this, so go ahead,
have a look at the new version and tell me that you think. Is anything missing
or would additional API calls be helpful?

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 Fri Aug 19 14:49:00 2011

This archive was generated by hypermail 2.1.8 : 2011-08-19 14:49:04 CEST