This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sporadic failures of selftest tests


On 10/17/2017 04:47 PM, Ulrich Weigand wrote:

> But what confuses me is that in a normal build, GDB by default gets
> built with -O2 for me, so I'm wondering why you had to use special
> CXXFLAGS above.  

Ah, sorry for not being clearer.  The build tree that I'm using is
configure with explicit CXXFLAGS="-g3 -O0", and so I had to use CXXFLAGS
to override what I had configured with.

> Also, I'm wondering why I'm only seeing this now,
> when this has apparently been broken all the time.  Just some random
> timing issues that are now different for some reason?

Commit bf4692711232 ("Eliminate catch_errors") also did this:

 @@ -1145,7 +1142,15 @@ captured_main (void *data)
       change - SET_TOP_LEVEL() - has been eliminated.  */
    while (1)
      {
 -      catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
 +      TRY
 +       {
 +         captured_command_loop ();
 +       }
 +      CATCH (ex, RETURN_MASK_ALL)
 +       {
 +         exception_print (gdb_stderr, ex);
 +       }
 +      END_CATCH
      }
 
So most probably before that commit captured_command_loop
wasn't inlined in captured main (unless LTO, maybe).

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]