|
From: Ashley P. <as...@qu...> - 2006-10-25 19:45:11
|
Julian,
This should hopefully be the last one for a while.
Make the signal code xml aware by printing out the correct tags around
the output.
Ashley,
Index: coregrind/m_signals.c
===================================================================
--- coregrind/m_signals.c (revision 6340)
+++ coregrind/m_signals.c (working copy)
@@ -1206,11 +1206,20 @@
}
if (VG_(clo_verbosity) > 1 || (could_core && info->si_code > VKI_SI_USER)) {
- VG_(message)(Vg_UserMsg, "");
- VG_(message)(Vg_UserMsg,
- "Process terminating with default action of signal %d (%s)%s",
- sigNo, signame(sigNo), core ? ": dumping core" : "");
-
+ if (VG_(clo_xml)) {
+ VG_(message)(Vg_UserMsg, "<error>");
+ VG_(message)(Vg_UserMsg, " <tid>%d</tid>", tid);
+ VG_(message)(Vg_UserMsg, " <kind>FatalSignal</kind>");
+ VG_(message)(Vg_UserMsg,
+ " <what>Process terminating with default action of signal %d (%s)%s</what>",
+ sigNo, signame(sigNo), core ? ": dumping core" : "");
+ } else {
+ VG_(message)(Vg_UserMsg, "");
+ VG_(message)(Vg_UserMsg,
+ "Process terminating with default action of signal %d (%s)%s",
+ sigNo, signame(sigNo), core ? ": dumping core" : "");
+ }
+
/* Be helpful - decode some more details about this fault */
if (info->si_code > VKI_SI_USER) {
const Char *event = NULL;
@@ -1276,17 +1285,27 @@
}
if (event != NULL) {
- if (haveaddr)
- VG_(message)(Vg_UserMsg, " %s at address %p",
- event, info->VKI_SIGINFO_si_addr);
- else
- VG_(message)(Vg_UserMsg, " %s", event);
+ if (VG_(clo_xml)) {
+ VG_(message)(Vg_UserMsg, " <event>%s</event>", event);
+ if (haveaddr)
+ VG_(message)(Vg_UserMsg, " <address>%p</address>",
+ info->VKI_SIGINFO_si_addr);
+ } else {
+ if (haveaddr)
+ VG_(message)(Vg_UserMsg, " %s at address %p",
+ event, info->VKI_SIGINFO_si_addr);
+ else
+ VG_(message)(Vg_UserMsg, " %s", event);
+ }
}
}
if (tid != VG_INVALID_THREADID) {
VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size));
}
+ if (VG_(clo_xml)) {
+ VG_(message)(Vg_UserMsg, "</error>");
+ }
}
if (VG_(is_action_requested)( "Attach to debugger", & VG_(clo_db_attach) )) {
|