2011-12-21 Joel Brobecker <brobecker@adacore.com>
+ * linespec.c (locate_first_half): Add handling of Ada operators
+ when the current language is Ada.
+
+2011-12-21 Joel Brobecker <brobecker@adacore.com>
+
* objfiles.c (insert_section_p): Do not detect overlay sections
if overlay debugging is off.
char *p, *p1;
int has_comma;
+ /* Check if the linespec starts with an Ada operator (such as "+",
+ or ">", for instance). */
+ p = *argptr;
+ if (p[0] == '"'
+ && current_language->la_language == language_ada)
+ {
+ const struct ada_opname_map *op;
+
+ for (op = ada_opname_table; op->encoded != NULL; op++)
+ if (strncmp (op->decoded, p, strlen (op->decoded)) == 0)
+ break;
+ if (op->encoded != NULL)
+ {
+ *is_quote_enclosed = 0;
+ return p + strlen (op->decoded);
+ }
+ }
+
/* Maybe we were called with a line range FILENAME:LINENUM,FILENAME:LINENUM
and we must isolate the first half. Outer layers will call again later
for the second half.