Gad D Lord
Gad D Lord

Reputation: 6762

madExcept required compiler directives

I use madExcept (not from the IDE) but in a automated batch process.

Which compiler directives I should switch on in order to have stack trace and line numbers. I do not care about loaded modules, processes or CPU registers.

I currently run with:

{$DEBUGINFO ON}
{$LOCALSYMBOLS ON}
{$REFERENCEINFO OFF}

But would like remove as much "fat" as possible but preserve the line numbers.

Upvotes: 4

Views: 991

Answers (2)

David Heffernan
David Heffernan

Reputation: 612954

These are the key settings:

  • Debug information (compiler options) enabled. This ensures that line number information is generated. If this option is not enabled, you will not have line numbers, only byte offsets into each function.
  • Debug information (linker options) disabled. This ensures that the executable does not contain the debug information.
  • The linker map file option set to Detailed. This ensures that the line number information is emitted in the .map file which is the information used by madExcept to convert addresses into unit names, method names, line numbers, etc.

The local symbols and reference info options don't affect the madExcept bug reports. None of the settings you mention affect the size of the executable.

Upvotes: 4

Sebastian Z
Sebastian Z

Reputation: 4730

According to the mad except help file, you should pass the -gd switch to the command line compiler in order to get a detailed map file. Don't forget to run the madExceptPatch.exe tool after compiling.

When you enable madexcept in the project options, it sets the following two compiler options:

{$DEBUGINFO 1}
{$LOCALSYMBOLS ON}

Upvotes: 1

Related Questions