Refactor svr4_create_solib_event_breakpoints
[external/binutils.git] / gdb / make-target-delegates
index b8cf63c..329306d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright (C) 2013-2018 Free Software Foundation, Inc.
+# Copyright (C) 2013-2019 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -225,7 +225,7 @@ sub write_delegator($$@) {
     if ($return_type ne 'void') {
        print "return ";
     }
-    print "this->beneath->" . $name . " (";
+    print "this->beneath ()->" . $name . " (";
     print join (', ', @names);
     print ");\n";
     print "}\n\n";
@@ -309,19 +309,19 @@ sub write_debugmethod($$$@) {
        print "  $return_type result;\n";
     }
 
-    print "  fprintf_unfiltered (gdb_stdlog, \"-> %s->$name (...)\\n\", this->beneath->shortname ());\n";
+    print "  fprintf_unfiltered (gdb_stdlog, \"-> %s->$name (...)\\n\", this->beneath ()->shortname ());\n";
 
     # Delegate to the beneath target.
     print "  ";
     if ($return_type ne 'void') {
        print "result = ";
     }
-    print "this->beneath->" . $name . " (";
+    print "this->beneath ()->" . $name . " (";
     print join (', ', @names);
     print ");\n";
 
     # Now print the arguments.
-    print "  fprintf_unfiltered (gdb_stdlog, \"<- %s->$name (\", this->beneath->shortname ());\n";
+    print "  fprintf_unfiltered (gdb_stdlog, \"<- %s->$name (\", this->beneath ()->shortname ());\n";
     for my $i (0 .. $#argtypes) {
        if ($i > 0) {
            print "  fputs_unfiltered (\", \", gdb_stdlog);\n"
@@ -390,10 +390,10 @@ sub print_class($) {
 
     print "struct " . $name . " : public target_ops\n";
     print "{\n";
-    print "  $name ();\n";
-    print "\n";
     print "  const target_info &info () const override;\n";
     print "\n";
+    print "  strata stratum () const override;\n";
+    print "\n";
 
     for $name (@delegators) {
        my $return_type = $return_types{$name};