Bug 24686 - FAIL: gdb.mi/mi-catch-cpp-exceptions.exp: all with invalid regexp: run until breakpoint in main (timeout)
Summary: FAIL: gdb.mi/mi-catch-cpp-exceptions.exp: all with invalid regexp: run until ...
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-16 12:30 UTC by Tom de Vries
Modified: 2019-06-16 21:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2019-06-16 12:30:26 UTC
...
PASS: gdb.mi/mi-catch-cpp-exceptions.exp: all with invalid regexp: Setup -catch-catch
-exec-continue^M
^running^M
*running,thread-id="all"^M
(gdb) ^M
&"not stopped at a C++ exception catchpoint\n"^M
=breakpoint-modified,bkpt={number="12",type="breakpoint",disp="keep",enabled="y",addr="0x00007ffff7ae7010",what="exception throw",catch-type="throw",thread-groups=["i1"],regexp="blahblah",times="1"}^M
~"\n"^M
~"Catchpoint 12 (exception thrown), 0x00007ffff7ae7010 in __cxa_throw () from /usr/lib64/libstdc++.so.6\n"^M
*stopped,bkptno="12",reason="breakpoint-hit",disp="keep",frame={addr="0x00007ffff7ae7010",func="__cxa_throw",args=[],from="/usr/lib64/libstdc++.so.6",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="3"^M
(gdb) ^M
FAIL: gdb.mi/mi-catch-cpp-exceptions.exp: all with invalid regexp: run until breakpoint in main (timeout)
...

AFAICT, this regexp:
...
    set testname "run until breakpoint in main"
    gdb_expect {
        -re "could not find minimal symbol for typeinfo address.*$mi_gdb_prompt$" {
            kfail "gdb/24541" "${testname}"
        }
        -re "\\*stopped,reason=\"breakpoint-hit\".*func=\"main\".*line=\"${main_lineno}\".*$mi_gdb_prompt$" {
            pass "${testname}"
        }
        timeout {
            fail "${testname} (timeout)"
        }
    }
...
fails to accommodate for bkptno="12".
Comment 1 Andrew Burgess 2019-06-16 15:26:41 UTC
Thanks for reporting this.

I'm guessing that you are running some variant of -m32? 

In which case you're hitting bug 24541, but it's not matching the KFAIL pattern that I was seeing, so the existing check fails.

I'll add another pattern to catch this case.
Comment 2 cvs-commit@gcc.gnu.org 2019-06-16 15:28:47 UTC
The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=93cb9841d68263174a600dc70af742a8e2eabfc6

commit 93cb9841d68263174a600dc70af742a8e2eabfc6
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Sun Jun 16 16:17:59 2019 +0100

    gdb/testsuite: Improve detection of bug gdb/24541
    
    In bug gdb/24686 a testsuite failure was reported, this failure was
    actually just another instance of bug gdb/24541, however, due to the
    non-deterministic nature of bug gdb/24541 the testsuite pattern that
    was intended to catch this bug failed.
    
    This commit adds a second pattern to help detect gdb/24541, which
    should change the FAIL reported in gdb/24686 into a KFAIL.
    
    gdb/testsuite/ChangeLog:
    
    	PR gdb/24686
    	* gdb.mi/mi-catch-cpp-exceptions.exp: Add an extra pattern to
    	improve detection of bug gdb/24541.
Comment 3 Tom de Vries 2019-06-16 21:34:37 UTC
(In reply to Andrew Burgess from comment #1)
> Thanks for reporting this.
> 
> I'm guessing that you are running some variant of -m32? 
> 

No, this is on x86_64-linux (openSUSE Leap 15.0).

> In which case you're hitting bug 24541, but it's not matching the KFAIL
> pattern that I was seeing, so the existing check fails.
> 
> I'll add another pattern to catch this case.
Comment 4 Tom de Vries 2019-06-16 21:47:06 UTC
Fixed by commit in comment 2.