+/* See annotate.h. */
+
+bool
+annotate_source_line (struct symtab *s, int line, int mid_statement,
+ CORE_ADDR pc)
+{
+ if (annotation_level > 0)
+ {
+ const std::vector<off_t> *offsets;
+ if (!g_source_cache.get_line_charpos (s, &offsets))
+ return false;
+ if (line > offsets->size ())
+ return false;
+
+ annotate_source (s->fullname, line, (int) (*offsets)[line - 1],
+ mid_statement, SYMTAB_OBJFILE (s)->arch (),
+ pc);
+
+ /* Update the current symtab and line. */
+ symtab_and_line sal;
+ sal.pspace = SYMTAB_PSPACE (s);
+ sal.symtab = s;
+ sal.line = line;
+ set_current_source_symtab_and_line (sal);
+
+ return true;
+ }
+
+ return false;
+}
+
+