Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1260)

Unified Diff: gdb/ada-lex.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/ada-lang.c ('k') | gdb/ada-lex.l » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/ada-lex.c
diff --git a/gdb/ada-lex.c b/gdb/ada-lex.c
index 92cd92cf65f4e6fd8c103849410e6fdc3a949edb..c962fec21e82767853be618afa091d343b66a8a0 100644
--- a/gdb/ada-lex.c
+++ b/gdb/ada-lex.c
@@ -2173,7 +2173,7 @@ int main()
/* Initialize the lexer for processing new expression. */
-void
+static void
lexer_init (FILE *inp)
{
BEGIN INITIAL;
@@ -2290,7 +2290,9 @@ processReal (const char *num0)
/* Store a canonicalized version of NAME0[0..LEN-1] in yylval.ssym. The
- resulting string is valid until the next call to ada_parse. It differs
+ resulting string is valid until the next call to ada_parse. If
+ NAME0 contains the substring "___", it is assumed to be already
+ encoded and the resulting name is equal to it. Otherwise, it differs
from NAME0 in that:
+ Characters between '...' or <...> are transfered verbatim to
yylval.ssym.
@@ -2310,8 +2312,18 @@ processId (const char *name0, int len)
int i0, i;
struct stoken result;
+ result.ptr = name;
while (len > 0 && isspace (name0[len-1]))
len -= 1;
+
+ if (strstr (name0, "___") != NULL)
+ {
+ strncpy (name, name0, len);
+ name[len] = '\000';
+ result.length = len;
+ return result;
+ }
+
i = i0 = 0;
while (i0 < len)
{
@@ -2351,7 +2363,6 @@ processId (const char *name0, int len)
}
name[i] = '\000';
- result.ptr = name;
result.length = i;
return result;
}
« no previous file with comments | « gdb/ada-lang.c ('k') | gdb/ada-lex.l » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698