Added an option to output the assembly after each transformation step of the
optimizer. git-svn-id: svn://svn.cc65.org/cc65/trunk@5781 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2009, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* (C) 2009-2012, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@@ -109,6 +109,24 @@ void OpenOutputFile ()
|
||||
|
||||
|
||||
|
||||
void OpenDebugOutputFile (const char* Name)
|
||||
/* Open an output file for debugging purposes. Will call Fatal() in case of
|
||||
* failures.
|
||||
*/
|
||||
{
|
||||
/* Output file must not be open and we must have a name*/
|
||||
PRECONDITION (OutputFile == 0);
|
||||
|
||||
/* Open the file */
|
||||
OutputFile = fopen (Name, "w");
|
||||
if (OutputFile == 0) {
|
||||
Fatal ("Cannot open debug output file `%s': %s", Name, strerror (errno));
|
||||
}
|
||||
Print (stdout, 1, "Opened debug output file `%s'\n", Name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CloseOutputFile ()
|
||||
/* Close the output file. Will call Fatal() in case of failures. */
|
||||
{
|
||||
@@ -121,6 +139,8 @@ void CloseOutputFile ()
|
||||
Fatal ("Cannot write to output file (disk full?)");
|
||||
}
|
||||
Print (stdout, 1, "Closed output file `%s'\n", OutputFilename);
|
||||
|
||||
OutputFile = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user