e: if 0 to disable code

SVN revision: 77624
This commit is contained in:
Sebastian Dransfeld 2012-10-09 08:28:18 +00:00
parent 5e17a3eaac
commit 9b436d3c26
1 changed files with 6 additions and 6 deletions

View File

@ -55,19 +55,18 @@ _e_write_safe_int(int fd, const char *buf, size_t size)
} }
static void static void
_e_gdb_print_backtrace(int fd) _e_gdb_print_backtrace(int fd __UNUSED__)
{ {
char cmd[1024];
size_t size;
int ret;
// FIXME: we are in a segv'd state. do as few function calls and things // FIXME: we are in a segv'd state. do as few function calls and things
// depending on a known working state as possible. this also prevents the // depending on a known working state as possible. this also prevents the
// white box allowing recovery or deeper gdbing, thus until this works // white box allowing recovery or deeper gdbing, thus until this works
// properly, it's disabled (properly means always reliable, always // properly, it's disabled (properly means always reliable, always
// printf bt and allows e to continue and pop up box, perferably allowing // printf bt and allows e to continue and pop up box, perferably allowing
// debugging in the gui etc. etc. // debugging in the gui etc. etc.
return; #if 0
char cmd[1024];
size_t size;
int ret;
if (getenv("E_NO_GDB_BACKTRACE")) if (getenv("E_NO_GDB_BACKTRACE"))
return; return;
@ -84,6 +83,7 @@ _e_gdb_print_backtrace(int fd)
_e_write_safe_int(fd, cmd, size); _e_write_safe_int(fd, cmd, size);
_e_write_safe(fd, "\n"); _e_write_safe(fd, "\n");
ret = system(cmd); // TODO: use popen() or fork()+pipe()+exec() and save to 'fd' ret = system(cmd); // TODO: use popen() or fork()+pipe()+exec() and save to 'fd'
#endif
} }
#define _e_backtrace(msg) _e_backtrace_int(2, msg, sizeof(msg)) #define _e_backtrace(msg) _e_backtrace_int(2, msg, sizeof(msg))