summaryrefslogtreecommitdiff
path: root/src/assert.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-01-23 13:45:44 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-01-23 13:45:44 +0100
commit2f9e06125208642ebc6f6ffdcaab44408412f090 (patch)
treee3681f196d0dc0d2ab566208b4203723f613ea5c /src/assert.cc
parent449776749246271ef6bb9f58ad100b28b34632c2 (diff)
assert: add some debug info in the message
Diffstat (limited to 'src/assert.cc')
-rw-r--r--src/assert.cc7
1 files changed, 6 insertions, 1 deletions
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 <sys/types.h>
+#include <unistd.h>
+
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: