]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
find_function_start_sal
authorPedro Alves <palves@redhat.com>
Fri, 1 Apr 2016 15:20:06 +0000 (16:20 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 19 Sep 2016 14:44:42 +0000 (15:44 +0100)
gdb/linespec.c
gdb/symtab.c

index 0c10f0465940b8d1c3119781b5b63baa9ac12c6a..611017e2b983ddcf20fb7adbc48829483f59b042 100644 (file)
@@ -4017,7 +4017,6 @@ symbol_to_sal (struct symtab_and_line *result,
   if (SYMBOL_CLASS (sym) == LOC_BLOCK)
     {
       *result = find_function_start_sal (sym, funfirstline);
-      result->symbol = sym;
       return 1;
     }
   else
index 9ad407dc9d90ee7e25cc227fcc1caae7e2cebe03..5dd97cfdf6f9d0b673fd2b0d57da971d945944e0 100644 (file)
@@ -3603,6 +3603,7 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
       sal.pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
       if (gdbarch_skip_entrypoint_p (gdbarch))
        sal.pc = gdbarch_skip_entrypoint (gdbarch, sal.pc);
+      sal.symbol = sym;
       return sal;
     }
 
@@ -3622,6 +3623,7 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
   if (funfirstline)
     skip_prologue_sal (&sal);
 
+  sal.symbol = sym;
   return sal;
 }