|
Re: [Q] Trying to get a build to backtrace
09/04/19 05:21 AM
|
|
|
> If you want GDB backtrace worthy, you need to add DEBUG=1.
No, this is incorrect. DEBUG=1 enables assertions, runtime downcast checks, and other stuff that slows MAME down but makes it crash hard with a useful error message on certain types of errors that would otherwise silently corrupt memory or crash in a weird way later.
> However, you cannot make a full binary SYMBOLS=1 + DEBUG=1 build in any OS that I'm > aware of as the project is THAT large.
SYMBOLS=1 in combination with SYMLEVEL controls the detail of debug symbols included, and indirectly the size of the binary:
- SYMBOLS=0 or SYMLEVEL=0 gives different results depending on the OS - you may get function names only, or no symbols at all
- SYMBOLS=1 SYMLEVEL=1 gives function names, line numbers and extern global variables only - this is adequate for getting a backtrace or following program flow in a debugger
- SYMBOLS=1 SYMLEVEL=2 also gives local variable information - this makes it easier to examine state while stepping through code in a debugger
- SYMBOLS=1 SYMLEVEL=3 adds additional information like macro definitions - this makes the output binary much larger, but may allow nice-to-have things like macro expansion in debugger expressions
You can definitely make a full build with SYMLEVEL=2 on macOS and Linux, and I've made a SYMLEVEL=3 build on macOS with clang. They just become impractically large and take a very long time to link.
> If you want to get something capable, you > should use the SOURCES= build and only compile the desired driver(s) you wish to look > at.> > EG: add SOURCES=src/mame/drivers/saitek_ssystem3.cpp
This is good advice if you're going for a higher SYMLEVEL just because of the time and disk space you'll save.
|
|