MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4463
Loc: Melbourne, Australia
Send PM
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.







Entire thread
Subject Posted by Posted on
* [Q] Trying to get a build to backtrace John IV 09/03/19 11:50 PM
. * Re: [Q] Trying to get a build to backtrace TafoidAdministrator  09/03/19 11:58 PM
. * Re: [Q] Trying to get a build to backtrace John IV  09/04/19 12:04 AM
. * Re: [Q] Trying to get a build to backtrace Vas Crabb  09/04/19 05:10 AM
. * Re: [Q] Trying to get a build to backtrace TafoidAdministrator  09/04/19 12:19 AM
. * Re: [Q] Trying to get a build to backtrace Vas Crabb  09/04/19 05:21 AM
. * Re: [Q] Trying to get a build to backtrace John IV  09/04/19 02:13 AM
. * Re: [Q] Trying to get a build to backtrace John IV  09/04/19 02:57 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 335 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 582