From 2f9e06125208642ebc6f6ffdcaab44408412f090 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 23 Jan 2013 13:45:44 +0100 Subject: [PATCH] assert: add some debug info in the message --- src/assert.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/assert.cc b/src/assert.cc index 6f945283..4bd51a04 100644 --- a/src/assert.cc +++ b/src/assert.cc @@ -2,6 +2,9 @@ #include "exception.hh" +#include +#include + namespace Kakoune { @@ -17,7 +20,9 @@ private: void on_assert_failed(const char* message) { - int res = system(("xmessage -buttons 'quit:0,ignore:1' '"_str + message + "'").c_str()); + String debug_info = "pid: " + int_to_str(getpid()); + int res = system(("xmessage -buttons 'quit:0,ignore:1' '"_str + + message + "\n[Debug Infos]\n" + debug_info + "'").c_str()); switch (res) { case -1: