]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix objc tests users/palves/fix-objc-tests
authorPedro Alves <palves@redhat.com>
Tue, 6 Jun 2017 11:25:33 +0000 (12:25 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 6 Jun 2017 11:25:33 +0000 (12:25 +0100)
gdb/testsuite/gdb.objc/basicclass.m
gdb/testsuite/gdb.objc/nondebug.m
gdb/testsuite/gdb.objc/objcdecode.m
gdb/testsuite/lib/gdb.exp

index 0de12db25a1b6e583870f56f1a00fa5579395ebc..eb62a351bc85bb8b4af522d14ef44d7079937493 100644 (file)
@@ -1,6 +1,7 @@
-#include <objc/Object.h>
+#import <Foundation/Foundation.h>
+#include <stdio.h>
 
-@interface BasicClass: Object
+@interface BasicClass: NSObject
 {
   id object;
 }
@@ -74,7 +75,7 @@ const char *_NSPrintForDebugger(id object)
 {
   /* This is not really what _NSPrintForDebugger should do, but it
      is a simple test if gdb can call this function */
-  if (object && [object respondsTo: @selector(myDescription)])
+  if (object && [object respondsToSelector: @selector(myDescription)])
     return [object myDescription];
 
   return NULL;
index dcbdde936c7f15ea03b20f43f493f26dc99c9b9a..2daa9a21e86a74b85ddb4b5011ce1ec5071a22d7 100644 (file)
@@ -1,10 +1,11 @@
-#include <objc/Object.h>
+#import <Foundation/Foundation.h>
+#include <stdio.h>
 
-@interface NonDebug: Object
+@interface NonDebug: NSObject
 {
 }
 @end
-@interface NonDebug2: Object
+@interface NonDebug2: NSObject
 {
 }
 @end
index 5e99618d115d5403834130527e7f2b1488ed438a..5485337fff162953a2bdddb591033bad1ba45d27 100644 (file)
@@ -1,6 +1,7 @@
-#include <objc/Object.h>
+#import <Foundation/Foundation.h>
+#include <stdio.h>
 
-@interface Decode: Object
+@interface Decode: NSObject
 {
 }
 - multipleDef;
@@ -42,7 +43,7 @@ const char *_NSPrintForDebugger(id object)
 {
   /* This is not really what _NSPrintForDebugger should do, but it
      is a simple test if gdb can call this function */
-  if (object && [object respondsTo: @selector(myDescription)])
+  if (object && [object respondsToSelector: @selector(myDescription)])
     return [object myDescription];
 
   return NULL;
index 6633d2429650f75f19553ef6ddb9082c58c18269..34dad6ebdb078880291c77f75e4fb6dd625df94a 100644 (file)
@@ -3742,7 +3742,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"
-    foreach lib {-lobjc -lpthreads -lpthread -lthread solaris} {
+    foreach lib {-lgnustep-base -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.
         if { $lib == "solaris" } {
@@ -3751,6 +3751,7 @@ proc gdb_compile_objc {source dest type options} {
         if { $lib != "-lobjc" } {
          set lib "-lobjc $lib"
        }
+       
         set options_with_lib [concat $options [list libs=$lib quiet]]
         set ccout [gdb_compile $source $dest $type $options_with_lib]
         switch -regexp -- $ccout {