projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f9692bd
)
Add DB/IO/W to backtraces
author
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 23 Oct 2014 19:02:30 +0000
(21:02 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 23 Oct 2014 19:02:30 +0000
(21:02 +0200)
citadel/citserver.c
patch
|
blob
|
history
diff --git
a/citadel/citserver.c
b/citadel/citserver.c
index ace58c5e713a35404bb8c42eb4daeb21d60d0cfc..2a64228f79bf86264f1b14f368eb3138de78f238 100644
(file)
--- a/
citadel/citserver.c
+++ b/
citadel/citserver.c
@@
-44,14
+44,15
@@
void cit_backtrace(void)
size_t size, i;
char **strings;
size_t size, i;
char **strings;
-
+ const char *p = IOSTR;
+ if (p == NULL) p = ""
size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
strings = backtrace_symbols(stack_frames, size);
for (i = 0; i < size; i++) {
if (strings != NULL)
size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
strings = backtrace_symbols(stack_frames, size);
for (i = 0; i < size; i++) {
if (strings != NULL)
- syslog(LOG_ALERT, "%s
\n"
, strings[i]);
+ syslog(LOG_ALERT, "%s
%s\n", p
, strings[i]);
else
else
- syslog(LOG_ALERT, "%
p\n"
, stack_frames[i]);
+ syslog(LOG_ALERT, "%
s %p\n", p
, stack_frames[i]);
}
free(strings);
#endif
}
free(strings);
#endif
@@
-77,7
+78,7
@@
void cit_oneline_backtrace(void)
StrBufAppendPrintf(Buf, "%p : ", stack_frames[i]);
}
free(strings);
StrBufAppendPrintf(Buf, "%p : ", stack_frames[i]);
}
free(strings);
- syslog(LOG_ALERT, "%s
\n"
, ChrPtr(Buf));
+ syslog(LOG_ALERT, "%s
%s\n", IOSTR
, ChrPtr(Buf));
FreeStrBuf(&Buf);
}
#endif
FreeStrBuf(&Buf);
}
#endif