laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16038 )


Change subject: add panic handler printing talloc context
......................................................................

add panic handler printing talloc context

Change-Id: I0f3a112b67dc94aaee2ee788976e14eeda4e452d
---
M sysmoOCTSIM/main.c
1 file changed, 8 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware 
refs/changes/38/16038/1

diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c
index 58c0278..3a6efd0 100644
--- a/sysmoOCTSIM/main.c
+++ b/sysmoOCTSIM/main.c
@@ -994,6 +994,13 @@
 #include <osmocom/core/msgb.h>
 void *g_tall_ctx;

+static void octsim_panic_handler(const char *fmt, va_list args)
+{
+       vfprintf(stdout, fmt, args);
+       talloc_report_full(NULL, stdout);
+       while (1);
+}
+
 DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc 
report")
 {
        talloc_report_full(g_tall_ctx, stdout);
@@ -1112,6 +1119,7 @@
        printf("g_tall_ctx=%p\r\n", g_tall_ctx);

        libosmo_emb_init();
+       osmo_set_panic_handler(octsim_panic_handler);

        LOGP(DUSB, LOGL_ERROR, "foobar usb\n");


--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16038
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I0f3a112b67dc94aaee2ee788976e14eeda4e452d
Gerrit-Change-Number: 16038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <lafo...@osmocom.org>
Gerrit-MessageType: newchange

Reply via email to