mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Add -d (debug mode) to the assembler options. In studyexpr, use the debug
flag, not the verbose flag to decide if the studied expression should be output. git-svn-id: svn://svn.cc65.org/cc65/trunk@5919 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
2c446018db
commit
4682d7542a
@ -92,6 +92,7 @@ Short options:
|
|||||||
-U Mark unresolved symbols as import
|
-U Mark unresolved symbols as import
|
||||||
-V Print the assembler version
|
-V Print the assembler version
|
||||||
-W n Set warning level n
|
-W n Set warning level n
|
||||||
|
-d Debug mode
|
||||||
-g Add debug info to object file
|
-g Add debug info to object file
|
||||||
-h Help (this text)
|
-h Help (this text)
|
||||||
-i Ignore case of symbols
|
-i Ignore case of symbols
|
||||||
@ -108,6 +109,7 @@ Long options:
|
|||||||
--cpu type Set cpu type
|
--cpu type Set cpu type
|
||||||
--create-dep name Create a make dependency file
|
--create-dep name Create a make dependency file
|
||||||
--create-full-dep name Create a full make dependency file
|
--create-full-dep name Create a full make dependency file
|
||||||
|
--debug Debug mode
|
||||||
--debug-info Add debug info to object file
|
--debug-info Add debug info to object file
|
||||||
--feature name Set an emulation feature
|
--feature name Set an emulation feature
|
||||||
--forget-inc-paths Forget include search paths
|
--forget-inc-paths Forget include search paths
|
||||||
@ -175,6 +177,12 @@ Here is a description of all the command line options:
|
|||||||
information to the assembler.
|
information to the assembler.
|
||||||
|
|
||||||
|
|
||||||
|
<tag><tt>-d, --debug</tt></tag>
|
||||||
|
|
||||||
|
Enables debug mode, something that should not be needed for mere
|
||||||
|
mortals:-)
|
||||||
|
|
||||||
|
|
||||||
<label id="option--feature">
|
<label id="option--feature">
|
||||||
<tag><tt>--feature name</tt></tag>
|
<tag><tt>--feature name</tt></tag>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*****************************************************************************/
|
|
||||||
/* */
|
/* */
|
||||||
/* main.c */
|
/* main.c */
|
||||||
/* */
|
/* */
|
||||||
@ -42,6 +42,7 @@
|
|||||||
#include "addrsize.h"
|
#include "addrsize.h"
|
||||||
#include "chartype.h"
|
#include "chartype.h"
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
|
#include "debugflag.h"
|
||||||
#include "mmodel.h"
|
#include "mmodel.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "scopedefs.h"
|
#include "scopedefs.h"
|
||||||
@ -97,6 +98,7 @@ static void Usage (void)
|
|||||||
" -U\t\t\t\tMark unresolved symbols as import\n"
|
" -U\t\t\t\tMark unresolved symbols as import\n"
|
||||||
" -V\t\t\t\tPrint the assembler version\n"
|
" -V\t\t\t\tPrint the assembler version\n"
|
||||||
" -W n\t\t\t\tSet warning level n\n"
|
" -W n\t\t\t\tSet warning level n\n"
|
||||||
|
" -d\t\t\t\tDebug mode\n"
|
||||||
" -g\t\t\t\tAdd debug info to object file\n"
|
" -g\t\t\t\tAdd debug info to object file\n"
|
||||||
" -h\t\t\t\tHelp (this text)\n"
|
" -h\t\t\t\tHelp (this text)\n"
|
||||||
" -i\t\t\t\tIgnore case of symbols\n"
|
" -i\t\t\t\tIgnore case of symbols\n"
|
||||||
@ -113,6 +115,7 @@ static void Usage (void)
|
|||||||
" --cpu type\t\t\tSet cpu type\n"
|
" --cpu type\t\t\tSet cpu type\n"
|
||||||
" --create-dep name\t\tCreate a make dependency file\n"
|
" --create-dep name\t\tCreate a make dependency file\n"
|
||||||
" --create-full-dep name\tCreate a full make dependency file\n"
|
" --create-full-dep name\tCreate a full make dependency file\n"
|
||||||
|
" --debug\t\t\tDebug mode\n"
|
||||||
" --debug-info\t\t\tAdd debug info to object file\n"
|
" --debug-info\t\t\tAdd debug info to object file\n"
|
||||||
" --feature name\t\tSet an emulation feature\n"
|
" --feature name\t\tSet an emulation feature\n"
|
||||||
" --forget-inc-paths\t\tForget include search paths\n"
|
" --forget-inc-paths\t\tForget include search paths\n"
|
||||||
@ -407,6 +410,15 @@ static void OptCreateFullDep (const char* Opt attribute ((unused)),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void OptDebug (const char* Opt attribute ((unused)),
|
||||||
|
const char* Arg attribute ((unused)))
|
||||||
|
/* Compiler debug mode */
|
||||||
|
{
|
||||||
|
++Debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void OptDebugInfo (const char* Opt attribute ((unused)),
|
static void OptDebugInfo (const char* Opt attribute ((unused)),
|
||||||
const char* Arg attribute ((unused)))
|
const char* Arg attribute ((unused)))
|
||||||
/* Add debug info to the object file */
|
/* Add debug info to the object file */
|
||||||
@ -869,6 +881,7 @@ int main (int argc, char* argv [])
|
|||||||
{ "--cpu", 1, OptCPU },
|
{ "--cpu", 1, OptCPU },
|
||||||
{ "--create-dep", 1, OptCreateDep },
|
{ "--create-dep", 1, OptCreateDep },
|
||||||
{ "--create-full-dep", 1, OptCreateFullDep },
|
{ "--create-full-dep", 1, OptCreateFullDep },
|
||||||
|
{ "--debug", 0, OptDebug },
|
||||||
{ "--debug-info", 0, OptDebugInfo },
|
{ "--debug-info", 0, OptDebugInfo },
|
||||||
{ "--feature", 1, OptFeature },
|
{ "--feature", 1, OptFeature },
|
||||||
{ "--forget-inc-paths", 0, OptForgetIncPaths },
|
{ "--forget-inc-paths", 0, OptForgetIncPaths },
|
||||||
@ -930,6 +943,10 @@ int main (int argc, char* argv [])
|
|||||||
LongOption (&I, OptTab, sizeof(OptTab)/sizeof(OptTab[0]));
|
LongOption (&I, OptTab, sizeof(OptTab)/sizeof(OptTab[0]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'd':
|
||||||
|
OptDebug (Arg, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'g':
|
case 'g':
|
||||||
OptDebugInfo (Arg, 0);
|
OptDebugInfo (Arg, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "print.h"
|
#include "debugflag.h"
|
||||||
#include "shift.h"
|
#include "shift.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
@ -537,7 +537,7 @@ static void StudySymbol (ExprNode* Expr, ExprDesc* D)
|
|||||||
SymUnmarkUser (Sym);
|
SymUnmarkUser (Sym);
|
||||||
|
|
||||||
/* If requested and if the expression is valid, dump it */
|
/* If requested and if the expression is valid, dump it */
|
||||||
if (Verbosity > 0 && !ED_HasError (D)) {
|
if (Debug > 0 && !ED_HasError (D)) {
|
||||||
DumpExpr (Expr, SymResolve);
|
DumpExpr (Expr, SymResolve);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user