aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-01-27 22:10:05 +0000
committerJohn Gilmore <gnu@cygnus>1992-01-27 22:10:05 +0000
commit5a4e72150520b0379fc6bce7debd6e98b0b3ec26 (patch)
treeb887ec85bb47bbf7f5ae38ca29a7bdcaff5afa2c /gdb
parentdc72b0b67900108ef033f0ffabb8e06ffa591e0b (diff)
downloadgdb-5a4e72150520b0379fc6bce7debd6e98b0b3ec26.zip
gdb-5a4e72150520b0379fc6bce7debd6e98b0b3ec26.tar.gz
gdb-5a4e72150520b0379fc6bce7debd6e98b0b3ec26.tar.bz2
* buildsym.c (read_struct_type): Circumvent sun3 sunos "--" compiler bug.
* c-exp.y (yylex): `this' and `template' are only tokens in C++. * target.c (target_xfer_memory): Return errno in preference to EIO.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/buildsym.c6
-rw-r--r--gdb/c-exp.y6
3 files changed, 14 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b66ef36..8330e92 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
Mon Jan 27 13:43:26 1992 John Gilmore (gnu at cygnus.com)
+ * buildsym.c (read_struct_type): Circumvent sun3 sunos "--"
+ compiler bug.
+ * c-exp.y (yylex): `this' and `template' are only tokens in C++.
+
+ * target.c (target_xfer_memory): Return errno in preference to EIO.
+
* xm-convex.h, xm-hp300bsd.h, xm-isi.h, xm-merlin.h, xm-news.h,
xm-np1.h, xm-pn.h, xm-pyr.h, xm-rtbsd.h, xm-symmetry.h, xm-umax.h:
Remove MISSING_VPRINTF declaration, and superfluous "kgdb" defines.
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index ae1d9f9..243cbe2 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -2475,8 +2475,10 @@ read_struct_type (pp, type)
TYPE_NFN_FIELDS_TOTAL (TYPE_BASECLASS (type, i));
}
- for (n = nfn_fields; mainlist; mainlist = mainlist->next)
- TYPE_FN_FIELDLISTS (type)[--n] = mainlist->fn_fieldlist;
+ for (n = nfn_fields; mainlist; mainlist = mainlist->next) {
+ --n; /* Circumvent Sun3 compiler bug */
+ TYPE_FN_FIELDLISTS (type)[n] = mainlist->fn_fieldlist;
+ }
if (**pp == '~')
{
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 7d4b177..6592076 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1297,7 +1297,8 @@ yylex ()
case 8:
if (!strncmp (tokstart, "unsigned", 8))
return UNSIGNED;
- if (!strncmp (tokstart, "template", 8))
+ if (current_language->la_language == language_cplus
+ && !strncmp (tokstart, "template", 8))
return TEMPLATE;
break;
case 6:
@@ -1319,7 +1320,8 @@ yylex ()
return ENUM;
if (!strncmp (tokstart, "long", 4))
return LONG;
- if (!strncmp (tokstart, "this", 4))
+ if (current_language->la_language == language_cplus
+ && !strncmp (tokstart, "this", 4))
{
static const char this_name[] =
{ CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };