summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2024-12-07 20:49:26 -0500
committerpommicket <pommicket@gmail.com>2024-12-07 20:49:26 -0500
commit9f6b0e7cd1bc8c92d014a14d02622f0ec986bc97 (patch)
tree755695a643a962eb05cf050c0beb830118795a90
parentbbe75ba8c590747e7df7664128afdf96aeb539e2 (diff)
Include main address in crash dump
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
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);