[Bug testsuite/24807] New: gdb.objc FAILs

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug testsuite/24807] New: gdb.objc FAILs

giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24807

            Bug ID: 24807
           Summary: gdb.objc FAILs
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

When running the objc tests, we have:
...
# of expected passes            13
# of unsupported tests          3
...

The UNSUPPORTED are:
...
Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.objc/basicclass.exp ...
UNSUPPORTED: gdb.objc/basicclass.exp: couldn't compile basicclass.m:
unrecognized error
Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.objc/nondebug.exp ...
UNSUPPORTED: gdb.objc/nondebug.exp: couldn't compile nondebug.m: unrecognized
error
Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.objc/objcdecode.exp ...
UNSUPPORTED: gdb.objc/objcdecode.exp: couldn't compile objcdecode.m:
unrecognized error
...

With this patch, we switch off all warning (so we no longer run into Werror,
causing the UNSUPPORTED):
...
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 49ec8b2a55..cfa0a1221d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3947,6 +3947,7 @@ proc gdb_compile_shlib_pthreads {sources dest options} {
 proc gdb_compile_objc {source dest type options} {
     set built_binfile 0
     set why_msg "unrecognized error"
+    lappend options "nowarnings"
     foreach lib {-lobjc -lpthreads -lpthread -lthread solaris} {
         # This kind of wipes out whatever libs the caller may have
         # set.  Or maybe theirs will override ours.  How infelicitous.
...
and get:
...
Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.objc/print.exp ...
Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.objc/objcdecode.exp ...
FAIL: gdb.objc/objcdecode.exp: continue after break on multiply defined symbol
Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.objc/nondebug.exp ...
Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.objc/basicclass.exp ...
FAIL: gdb.objc/basicclass.exp: continue until method breakpoint
FAIL: gdb.objc/basicclass.exp: continue until method breakpoint
FAIL: gdb.objc/basicclass.exp: print an ivar of self
FAIL: gdb.objc/basicclass.exp: print self
FAIL: gdb.objc/basicclass.exp: print contents of self
FAIL: gdb.objc/basicclass.exp: continue until category method
FAIL: gdb.objc/basicclass.exp: call an Objective-C method with no arguments
FAIL: gdb.objc/basicclass.exp: call an Objective-C method with one argument
FAIL: gdb.objc/basicclass.exp: use of the print-object command
FAIL: gdb.objc/basicclass.exp: use of the po (print-object) command

                === gdb Summary ===

# of expected passes            28
# of unexpected failures        11
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug testsuite/24807] gdb.objc FAILs

giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24807

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at sourceware dot org

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug testsuite/24807] gdb.objc FAILs

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24807

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Iain,

Could you take a look at these compilation warnings?

...
$ grep -i warning: gdb.log | sort -u
gdb/testsuite/gdb.objc/basicclass.m:22:3: warning: '...' as arguments.)
gdb/testsuite/gdb.objc/basicclass.m:22:3: warning: 'BasicClass' may not respond
to '+new'
gdb/testsuite/gdb.objc/basicclass.m:22:3: warning: (Messages without a matching
method signature
gdb/testsuite/gdb.objc/basicclass.m:22:3: warning: will be assumed to return
'id' and accept
gdb/testsuite/gdb.objc/basicclass.m:41:3: warning: incompatible implicit
declaration of built-in function 'printf'
gdb/testsuite/gdb.objc/basicclass.m:47:3: warning: incompatible implicit
declaration of built-in function 'printf'
gdb/testsuite/gdb.objc/basicclass.m:68:3: warning: 'BasicClass' may not respond
to '+new'
gdb/testsuite/gdb.objc/basicclass.m:77:3: warning: no '-respondsTo:' method
found
gdb/testsuite/gdb.objc/nondebug.m:16:3: warning: incompatible implicit
declaration of built-in function 'printf'
gdb/testsuite/gdb.objc/nondebug.m:25:3: warning: incompatible implicit
declaration of built-in function 'printf'
gdb/testsuite/gdb.objc/nondebug.m:35:3: warning: '...' as arguments.)
gdb/testsuite/gdb.objc/nondebug.m:35:3: warning: 'NonDebug' may not respond to
'+new'
gdb/testsuite/gdb.objc/nondebug.m:35:3: warning: (Messages without a matching
method signature
gdb/testsuite/gdb.objc/nondebug.m:35:3: warning: will be assumed to return 'id'
and accept
gdb/testsuite/gdb.objc/objcdecode.m:14:3: warning: incompatible implicit
declaration of built-in function 'printf'
gdb/testsuite/gdb.objc/objcdecode.m:28:3: warning: incompatible implicit
declaration of built-in function 'printf'
gdb/testsuite/gdb.objc/objcdecode.m:35:3: warning: '...' as arguments.)
gdb/testsuite/gdb.objc/objcdecode.m:35:3: warning: 'Decode' may not respond to
'+new'
gdb/testsuite/gdb.objc/objcdecode.m:35:3: warning: (Messages without a matching
method signature
gdb/testsuite/gdb.objc/objcdecode.m:35:3: warning: will be assumed to return
'id' and accept
gdb/testsuite/gdb.objc/objcdecode.m:45:3: warning: no '-respondsTo:' method
found
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug testsuite/24807] gdb.objc FAILs

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24807

--- Comment #2 from Iain Sandoe <iains at sourceware dot org> ---
Is this a regression?
if so, any idea on the change(s) that caused it?
what version of GCC is in use?
assuming that the target is x86_64-linux-gnu?
so that we're talking about -fgnu-runtime, not the next one.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug testsuite/24807] gdb.objc FAILs

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24807

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #2)
> Is this a regression?

I don't know.

> if so, any idea on the change(s) that caused it?

I recently committed "[gdb/testsuite] Fix unterminated string in
gdb.objc/basicclass.exp", a fix for an objc test-case that was broken by a
refactoring commit in 2014. So, I don't have the idea that anybody's tracking
regressions.

> what version of GCC is in use?

Gcc 7.4.1.

> assuming that the target is x86_64-linux-gnu?

Indeed.

> so that we're talking about -fgnu-runtime, not the next one.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug testsuite/24807] gdb.objc FAILs

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24807

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <[hidden email]>:

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

commit b3b965fb91e1671da5b7d42349fa0d78e80c29f4
Author: Tom de Vries <[hidden email]>
Date:   Wed Jul 24 19:01:59 2019 +0200

    [gdb/testsuite] Fix implicit declaration of printf in gdb.objc/*.m

    When running gdb.objc/objcdecode.exp we get:
    ...
    objcdecode.m: In function '-[Decode multipleDef]':
    objcdecode.m:14:3: warning: incompatible implicit declaration of built-in \
      function 'printf'
       printf("method multipleDef\n");
       ^~~~~~
    objcdecode.m:14:3: note: include '<stdio.h>' or provide a declaration of \
      'printf'
    ...

    Fix this in the three gdb.objc/*.m test-cases by including stdio.h.

    Tested on x86_64-linux.

    gdb/testsuite/ChangeLog:

    2019-07-24  Tom de Vries  <[hidden email]>

        PR testsuite/24807
        * gdb.objc/basicclass.m: Include stdio.h.
        * gdb.objc/nondebug.m: Same.
        * gdb.objc/objcdecode.m: Same.

--
You are receiving this mail because:
You are on the CC list for the bug.