Skip to content

Conversation

@jayrm
Copy link
Member

@jayrm jayrm commented Jun 23, 2019

This change adds a finer grain of control over debug code generation by adding several new command line options. The existing meaning of -e, -ex, -exx, -g is not changed.

For reference, see discussion at How to do -g but without assertions?

[changed]

  • '-v' be verbose command line option affects '-help' output

[added]

  • '-earray' command line option to enable array bounds checking
  • '-enullptr' command line option to enable null pointer checking
  • '-eassert' command line option to enable assert() and assertwarn() checking
  • '-edebug' command line option to enable __FB_DEBUG__
  • '-edebuginfo' command line option to enable debug symbols
  • '-elocation' command line option to enable reporting error location

Comparison to existing options:

  • -g is same as before, implies -edebug, -edebuginfo, -eassert
  • -e is same as before
  • -ex is same as before, implies -e
  • -exx is same as before, implies -e, -ex, -earray, -enullptr, -elocation

Unrelated to debug code generation, skeleton code is provided to help user determine how fbc is built and expected defaults:

  • -help -v gives verbose help
  • -version -v gives verbose version information

jayrm added 8 commits June 23, 2019 10:31
- '-earray' enable array bounds checking
- '-enullptr' enable null pointer checking
- '-eassert' enables assert() and assertwarn() run time checking
-FB_RTL_OPT_DBGONLY => FB_RTL_OPT_ASSERTONLY
- '-eassert' command line option to enable assert() and assertwarn() checking
- '-edebug' command line option to enable __FB_DEBUG__
- '-edebuginfo' command line option to enable debug symbols
- '-elocation' command line option to enable reporting error location
- '-earray': Enable array bounds checking
- '-eassert': Enable assert() and assertwarn() checking
- '-edebug': Enable __FB_DEBUG__
- '-debuginfo': Add debug information
- '-elocation': Enable full error location reporting
- '-enullptr': Enable null-pointer checking
@jayrm jayrm changed the title New command line options for control over debug code generation Command line options for control over debug code generation Jul 13, 2019
@jayrm jayrm merged commit dde5e66 into freebasic:master Jul 13, 2019
@jayrm jayrm deleted the debug-options branch July 13, 2019 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant