Re: [cc65] ca65: Finding out which lines assembled into which addresses

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2005-12-08 07:26:07
Hello Uz,

On Wed, Dec 07, 2005 at 07:16:21PM +0100, Ullrich von Bassewitz wrote:
 
> I don't know exactly, what you're trying to do, but how about using
> the disassembler? You wouldn't get the exact same output for file B,
> but it's easy to assign comments to specific code locations.

I already have a disassembled version.

Ok, what do I have: I have a source for some program. This program is
available in different versions. Anyway, the source can compile all of
them, thus, this source is cluttered with some .if directives. Oh, I
forgot, this source includes some other files, too.

OTOH, I have a disassembly which is highly commented. This disassembly
corresponds to exactly one version of the source.

I want to copy the comments from the disassembly to the sources (exactly
to the same parts which are used for compiling this specific version).
Afterwards, I would be able to fill in the remaining parts of other
versions, to get just one file for all versions.

If you need more specific information, I could send you the files in
questions, so you can see what I mean.

My idea until now was to parse the listing file to be able to which
address was assembled from which source file and which line in it.

Of course, this is not really necessary. All I need is something like:

address,file,line no

For example, if $1234 was assembled from line 6789 of file source1.a65:

1234,source1.a65,6789

I believe this information must already reside somewhere in ca65.
Unfortunately, I did not understand its internals enough (yet?) to be
able to do the modifications myself. Thus, I could make use of some
good hints. ;)

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
http://cbm4win.sf.net/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Dec 8 09:49:20 2005

This archive was generated by hypermail 2.1.8 : 2005-12-08 09:49:23 CET