]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
compiler, runtime: mark stub methods, ignore them in runtime.Caller.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 3 Feb 2016 06:54:41 +0000 (06:54 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 3 Feb 2016 06:54:41 +0000 (06:54 +0000)
    This fixes the long-standing bug in which the testing package misreports
    the file/line of an error.

    Reviewed-on: https://go-review.googlesource.com/19179

From-SVN: r233098

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/types.cc
libgo/runtime/go-callers.c

index 3fb2a3e0c878e456d256e996919d131e72afe0a7..4f095c4d3f25253e969e0303308d71d078d5c8fe 100644 (file)
@@ -1,4 +1,4 @@
-a408bef550251926c28673818db2c64302faac1d
+c70e74c116d08c6f2e787551eb1366983815c032
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index c43d0645a0f7e2850de20a97053c132080927772..0443281dd8154f6d8c4558b6d3620e2ca64caf23 100644 (file)
@@ -9632,13 +9632,14 @@ Type::build_stub_methods(Gogo* gogo, const Type* type, const Methods* methods,
        package = NULL;
       else
        package = type->named_type()->named_object()->package();
+      std::string stub_name = name + "$stub";
       Named_object* stub;
       if (package != NULL)
-       stub = Named_object::make_function_declaration(name, package,
+       stub = Named_object::make_function_declaration(stub_name, package,
                                                       stub_type, location);
       else
        {
-         stub = gogo->start_function(name, stub_type, false,
+         stub = gogo->start_function(stub_name, stub_type, false,
                                      fntype->location());
          Type::build_one_stub_method(gogo, m, buf, stub_params,
                                      fntype->is_varargs(), location);
index b5ab3be6473e5f8a1b4680379af15943b69c44f6..0c1c60314567d89f630a9c8da3e5d9a6018a60a5 100644 (file)
@@ -74,6 +74,8 @@ callback (void *data, uintptr_t pc, const char *filename, int lineno,
       p = __builtin_strrchr (function, '$');
       if (p != NULL && __builtin_strcmp(p, "$recover") == 0)
        return 0;
+      if (p != NULL && __builtin_strncmp(p, "$stub", 5) == 0)
+       return 0;
     }
 
   if (arg->skip > 0)