diff options
Diffstat (limited to 'dbug')
-rw-r--r-- | dbug/dbug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c index 8f214bfbe7c..88d8043c0e5 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -706,8 +706,6 @@ char ***_sframep_ __attribute__((unused))) if (!_no_db_) { int save_errno=errno; - if (!init_done) - _db_push_ (_DBUG_START_CONDITION_); /* Sasha: the test below is so we could call functions with DBUG_ENTER before my_thread_init(). I needed this because I suspected corruption of a block allocated by my_thread_init() itself, so I wanted to use @@ -715,6 +713,8 @@ char ***_sframep_ __attribute__((unused))) */ if (!(state=code_state())) return; + if (!init_done) + _db_push_ (_DBUG_START_CONDITION_); *_sfunc_ = state->func; *_sfile_ = state->file; @@ -794,10 +794,10 @@ uint *_slevel_) if (!_no_db_) { int save_errno=errno; + if (!(state=code_state())) + return; if (!init_done) _db_push_ (""); - if (!(state=code_state())) - return; /* Only happens at end of program */ if (stack->flags & (TRACE_ON | DEBUG_ON | PROFILE_ON)) { if (!state->locked) |