From 9f6b0e7cd1bc8c92d014a14d02622f0ec986bc97 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sat, 7 Dec 2024 20:49:26 -0500 Subject: Include main address in crash dump --- main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 7136f14..d02d044 100644 --- a/main.c +++ b/main.c @@ -153,6 +153,8 @@ static void error_signal_handler(int signum, siginfo_t *info, void *context) { fprintf(log, "code = %d\n", info->si_code); fprintf(log, "address = 0x%llx\n", (unsigned long long)info->si_addr); #if __linux__ + int main(int, char **); + fprintf(log, "main address = %#llx\n", (unsigned long long)main); fprintf(log, "utime = %lu\n", (unsigned long)info->si_utime); fprintf(log, "stime = %lu\n", (unsigned long)info->si_stime); fprintf(log, "address lsb = %d\n", info->si_addr_lsb); -- cgit v1.2.3