glib/tests/.gitignore
Martin Pitt da66897950 Support storing assertion messages into core dump
Crash interception/debugging systems like Apport or ABRT capture core dumps for
later crash analysis. However, if a program exits with an assertion failure,
the core dump is not useful since the assertion message is only printed to
stderr.

glibc recently got a patch which stores the message of assert() into the
__abort_msg global variable.
(http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=48dcd0ba)
That works fine for programs which actually use the standard C assert() macro.

This patch adds the same functionality for glib's assertion tests. If we are
building against a glibc which already has __abort_msg (2.11 and later, or
backported above git commit), use that, otherwise put it into our own field
__glib_assert_msg.

Usage:

  $ cat test.c
  #include <glib.h>

  int main() {
      g_assert(1 < 0);
      return 0;
  }

  $ ./test
  **ERROR:test.c:5:main: assertion failed: (1 < 0)
  Aborted (Core dumped)

  $ gdb --batch --ex 'print (char*) __abort_msg' ./test core
  [...]
  $1 = 0x93bf028 "ERROR:test.c:5:main: assertion failed: (1 < 0)"

https://bugzilla.gnome.org/show_bug.cgi?id=594872
2009-12-23 15:51:11 +00:00

76 lines
943 B
Plaintext

assert-msg-test
asyncqueue-test
atomic-test
base64-test
bit-test
bookmarkfile-test
checksum-test
child-test
closures
collate.out
completion-test
convert-test
cxx-test
date-test
deftype
dirname-test
env-test
errorcheck-mutex-test
file-test
file-test-get-contents
gio-test
hash-test
iochannel-test
iochannel-test-outfile
list-test
mainloop-test
mapchild
mapping-test
maptest
markup-collect
markup-escape-test
markup-test
module-test
node-test
objects
objects2
onceinit
patterntest
properties
properties2
qsort-test
queue-test
regex-test
relation-test
scannerapi
sequence-test
shell-test
signal1
signal2
signal3
slice-color
slice-concurrent
slice-test
slice-threadinit
slist-test
spawn-test
testgdate
testgdateparser
testglib
testingbase64
testmarshal.c
testmarshal.h
thread-test
threadpool-test
timeloop
timeloop-closure
tree-test
type-test
unicode-caseconv
unicode-collate
unicode-encoding
unicode-normalize
uri-test
utf8-pointer
utf8-validate