13
0

Add separator around stacktraces in scan-log

This commit is contained in:
Robin Gareus 2021-07-12 23:33:03 +02:00
parent 2ee5082b06
commit 5ddb88724e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 15 additions and 10 deletions

View File

@ -99,8 +99,9 @@ scan_auv2 (CAComponentDescription& desc, bool force, bool verbose)
static void
sig_handler (int sig)
{
fprintf (stderr, "Error: signal %d\n", sig);
PBD::stacktrace (cerr, 15, 2);
printf ("Error: signal %d\n ---8<---\n", sig);
PBD::stacktrace (std::cout,, 15, 2);
printf (" --->8---\n");
::exit (EXIT_FAILURE);
}

View File

@ -135,16 +135,18 @@ static LONG WINAPI
crash_handler (EXCEPTION_POINTERS* exceptioninfo)
{
// TODO consider DrMingw if HAVE_DRMINGW
fprintf (stderr, "Error: %x\n", exceptioninfo->ExceptionRecord->ExceptionCode);
PBD::stacktrace (cerr, 15, 2);
printf ("Error: %x\n ---8<---\n", exceptioninfo->ExceptionRecord->ExceptionCode);
PBD::stacktrace (std::cout, 15, 2);
printf (" --->8---\n");
return EXCEPTION_CONTINUE_SEARCH;
}
#else
static void
sig_handler (int sig)
{
fprintf (stderr, "Error: signal %d\n", sig);
PBD::stacktrace (cerr, 15, 2);
printf ("Error: signal %d\n ---8<---\n", sig);
PBD::stacktrace (std::cout, 15, 2);
printf (" --->8---\n");
::exit (EXIT_FAILURE);
}
#endif

View File

@ -122,16 +122,18 @@ static LONG WINAPI
crash_handler (EXCEPTION_POINTERS* exceptioninfo)
{
// TODO consider DrMingw if HAVE_DRMINGW
fprintf (stderr, "Error: %x\n", exceptioninfo->ExceptionRecord->ExceptionCode);
PBD::stacktrace (cerr, 15, 2);
printf ("Error: %x\n ---8<---\n", exceptioninfo->ExceptionRecord->ExceptionCode);
PBD::stacktrace (std::cout, 15, 2);
printf (" --->8---\n");
return EXCEPTION_CONTINUE_SEARCH;
}
#else
static void
sig_handler (int sig)
{
fprintf (stderr, "Error: signal %d\n", sig);
PBD::stacktrace (cerr, 15, 2);
printf ("Error: signal %d\n ---8<---\n", sig);
PBD::stacktrace (std::cout, 15, 2);
printf (" --->8---\n");
::exit (EXIT_FAILURE);
}
#endif