diff --git a/changelog.txt b/changelog.txt index ac096453dc..59b46bf05a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -20,7 +20,7 @@ Version 1.10.0 [added] - gas64: '.cif_sections' and '.cif_' directives for stack unwinding (adeyblue) - gas64: '.seh_' directives for stack unwinding (adeyblue) -- fbc: '-eunwind' command line option to enable stack unwind information +- fbc: '-eunwind' command line option to enable stack unwind information, implied by '-e', '-ex', '-exx' - fbc: set bit value '__FB_ERR__' = &h200 if '-eunwind' is enabled - gas64 : stack overflow check (total of all local variables) at compile time --> warning - stack size for linux = 8MB, for Windows = default or defined by user (SARG) - gas64 : stack overflow check at run time if -exx is used - stack size for linux = 8MB, for Windows = default or defined by user (SARG) diff --git a/src/compiler/fbc.bas b/src/compiler/fbc.bas index ee607ee650..4d1848b8a2 100644 --- a/src/compiler/fbc.bas +++ b/src/compiler/fbc.bas @@ -1866,6 +1866,7 @@ private sub handleOpt _ case OPT_EX fbSetOption( FB_COMPOPT_ERRORCHECK, TRUE ) fbSetOption( FB_COMPOPT_RESUMEERROR, TRUE ) + fbSetOption( FB_COMPOPT_UNWINDINFO, TRUE ) case OPT_EXX fbSetOption( FB_COMPOPT_ERRORCHECK, TRUE ) @@ -1874,6 +1875,7 @@ private sub handleOpt _ fbSetOption( FB_COMPOPT_ERRLOCATION, TRUE ) fbSetOption( FB_COMPOPT_ARRAYBOUNDCHECK, TRUE ) fbSetOption( FB_COMPOPT_NULLPTRCHECK, TRUE ) + fbSetOption( FB_COMPOPT_UNWINDINFO, TRUE ) case OPT_EXPORT fbSetOption( FB_COMPOPT_EXPORT, TRUE ) @@ -3355,7 +3357,7 @@ private function hCompileStage2Module( byval module as FBCIOFILE ptr ) as intege '' But enable unwind-tables on x64, these GREATLY increase the accuracy of '' debuggers and crash tools across platforms for minimal overhead - if ( ism64Target ) then + if( (ism64Target = TRUE) or (fbGetOption( FB_COMPOPT_UNWINDINFO ) = TRUE) ) then ln += "-funwind-tables " else ln += "-fno-unwind-tables "