Commit d06e63a5f604f1592c82d443c136e8a3c14c5c51 brings improved assert functions to LIBCx. The key difference from the POSIX assert is that these functions now use the LIBC logger to log assert messages to a per-process file in /@unixroot/var/log/libcx, as well as __libc_LogAssert that will generate XCPT_BREAKPOINT (unless disabled with LIBC_STRICT_DISABLED=1 in the environment) when the assertion is triggered. This breakpoint will cause EXCEPTQ to generate a .TRP file with the stack trace, debug symbols and a lot of other useful info.
Since LIBCx assert functions are always enabled, these two files (the assert log and .TRP) will be generated even in release builds which allows to catch bugs on the user side (and this is where most bugs show themselves up, isn't it?) simply by asking users experiencing problems to look for these files and send them to the developer. The .TRP file is created in the current dir for now but I will hack EXCEPTQ one day to have it generated in /@unixroot/var/log/libcx as well.
This error catching technique is very useful not only for LIBCx itself of course but for higher level applications as well. For this reason we should make these new assert functions public and available for any application linked against LIBCx.
Commit d06e63a5f604f1592c82d443c136e8a3c14c5c51 brings improved assert functions to LIBCx. The key difference from the POSIX
assert
is that these functions now use the LIBC logger to log assert messages to a per-process file in/@unixroot/var/log/libcx
, as well as__libc_LogAssert
that will generate XCPT_BREAKPOINT (unless disabled with LIBC_STRICT_DISABLED=1 in the environment) when the assertion is triggered. This breakpoint will cause EXCEPTQ to generate a .TRP file with the stack trace, debug symbols and a lot of other useful info.Since LIBCx assert functions are always enabled, these two files (the assert log and .TRP) will be generated even in release builds which allows to catch bugs on the user side (and this is where most bugs show themselves up, isn't it?) simply by asking users experiencing problems to look for these files and send them to the developer. The .TRP file is created in the current dir for now but I will hack EXCEPTQ one day to have it generated in
/@unixroot/var/log/libcx
as well.This error catching technique is very useful not only for LIBCx itself of course but for higher level applications as well. For this reason we should make these new assert functions public and available for any application linked against LIBCx.