flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Outputting separate info in separate files upon compilation?

Author
Thread Post new topic Reply to topic
Big Red



Joined: 25 Feb 2005
Posts: 43
Big Red 05 Apr 2006, 17:06
Well... that pretty much describes it. I quickly read through the documentation but couldn't find anything relevant to what I was looking for (or did I not look hard enough? Read on...).

I know that you can use FASM to input data from separate files with special directives, but is there a way that you can output debug or other information to text files when you compile? For example, I would like to get the assembler to print the addresses of all my labels with the names of the labels into a separate text file when my project is compiled, not affecting the main project output file, of course. This would be very useful when debugging time comes, for finding labels in debuggers, of course.

Basically, if there are any macros to do this, if somebody could point me in the right direction, it'd be appreciated. If not, if anyone knows of good ways to fetch label addresses when debugging FASM programs or any other sort of debug output standards for them, that'd be great too. While I've been doing FASM for quite awhile now, I always relied on piss-poor debugging methods for which you would laugh at me if I were to describe.

Thanks in advance.

P.S.: Great work on the new FASM versions, Mr. Grysztar. It compiles 100KB source files filled solely with structures in a snap.
Post 05 Apr 2006, 17:06
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 05 Apr 2006, 17:25
Post 05 Apr 2006, 17:25
View user's profile Send private message Visit poster's website Reply with quote
Big Red



Joined: 25 Feb 2005
Posts: 43
Big Red 05 Apr 2006, 18:16
Wow, thank you; that's exactly what I was looking for (the result, at least). I tried SYMBDUMP.INC with the IDE assembler (1.65.17) and it worked perfectly. It generated a 9 MB file of, well, everything, and quickly (I wish Dr.Java could do that).

Could SYMBDUMP.INC be integrated into the package, even as a test, just so we don't have to recompile every release? (i.e., just put it as an INI option, and skip over "call symbol_dump" if not enabled)

Either way, this is great.
Post 05 Apr 2006, 18:16
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 06 Apr 2006, 09:40
How would you use the symdump.inc file?
Post 06 Apr 2006, 09:40
View user's profile Send private message Reply with quote
Big Red



Joined: 25 Feb 2005
Posts: 43
Big Red 07 Apr 2006, 01:16
It ouputs all the symbols used internally by FASM, such as procedure names and variable labels. It then outputs their default memory addresses ("value"), so you can find them easily by address in a debugger after assembly/disassembly. If you're asking how to use the file itself, well that's described in Mr. Grysztar's link. And if you're referring to the question I last asked, err I don't know what to explain because I thought it was a pretty simple request as it was.
Post 07 Apr 2006, 01:16
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 07 Apr 2006, 07:30
Took another look at the post, and I see it now, I just didn't read it very good before Embarassed , thanks.
Post 07 Apr 2006, 07:30
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 07 Apr 2006, 16:38
I got it to work, but because I have a huge window include library, the output of a simple windows program came to ~9mb Confused . Could the problem be that its outputing all variables used or un-used?
Post 07 Apr 2006, 16:38
View user's profile Send private message Reply with quote
Big Red



Joined: 25 Feb 2005
Posts: 43
Big Red 04 May 2006, 12:44
Yeah, I think it outputs pretty much everything. Mine comes out at about that size too, but I'm not complaining; that's what I want, heheh. You could most likely filter out what's printed by modifying the code in SYMBDUMP.INC, but you'll have to have a look at the FASM source to see what conditions you need to test with regards to label info (or ask Tomasz).
Post 04 May 2006, 12:44
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.