aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-10-26 02:05:14 +0000
committerPer Bothner <per@bothner.com>1991-10-26 02:05:14 +0000
commitbcccec8c8d084669c7469b8578448fa18ddbe2f3 (patch)
treeb9d4dc16487be188271c1a72694724d15fe0f25d /gdb/dbxread.c
parent5ab580ccf8a55393e038e4c9e90cd57b43e5f02c (diff)
downloadgdb-bcccec8c8d084669c7469b8578448fa18ddbe2f3.zip
gdb-bcccec8c8d084669c7469b8578448fa18ddbe2f3.tar.gz
gdb-bcccec8c8d084669c7469b8578448fa18ddbe2f3.tar.bz2
Various fixes to improve g++ debugging. See ChangeLog.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c45
1 files changed, 29 insertions, 16 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index dbb786a..7fb59c7 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -4628,21 +4628,33 @@ read_struct_type (pp, type)
*pp = p + 1;
new_sublist->visibility = *(*pp)++ - '0';
if (**pp == '\\') *pp = next_symbol_text ();
- /* FIXME-tiemann: need to add const/volatile info
- to the methods. For now, just skip the char.
- In future, here's what we need to implement:
-
- A for normal functions.
- B for `const' member functions.
- C for `volatile' member functions.
- D for `const volatile' member functions. */
- if (**pp == 'A' || **pp == 'B' || **pp == 'C' || **pp == 'D')
- (*pp)++;
-
- /* This probably just means we're processing a file compiled
- with g++ version 1. */
- else
- complain(&const_vol_complaint, **pp);
+ switch (**pp)
+ {
+ case 'A': /* Normal functions. */
+ new_sublist->fn_field.is_const = 0;
+ new_sublist->fn_field.is_volatile = 0;
+ (*pp)++;
+ break;
+ case 'B': /* `const' member functions. */
+ new_sublist->fn_field.is_const = 1;
+ new_sublist->fn_field.is_volatile = 0;
+ (*pp)++;
+ break;
+ case 'C': /* `volatile' member function. */
+ new_sublist->fn_field.is_const = 0;
+ new_sublist->fn_field.is_volatile = 1;
+ (*pp)++;
+ break;
+ case 'D': /* `const volatile' member function. */
+ new_sublist->fn_field.is_const = 1;
+ new_sublist->fn_field.is_volatile = 1;
+ (*pp)++;
+ break;
+ default:
+ /* This probably just means we're processing a file compiled
+ with g++ version 1. */
+ complain(&const_vol_complaint, **pp);
+ }
switch (*(*pp)++)
{
@@ -4655,7 +4667,7 @@ read_struct_type (pp, type)
the sign bit out, and usable as a valid index into
the array. Remove the sign bit here. */
new_sublist->fn_field.voffset =
- (0x7fffffff & read_number (pp, ';')) + 1;
+ (0x7fffffff & read_number (pp, ';')) + 2;
if (**pp == '\\') *pp = next_symbol_text ();
@@ -4697,6 +4709,7 @@ read_struct_type (pp, type)
new_sublist->next = sublist;
sublist = new_sublist;
length++;
+ if (**pp == '\\') *pp = next_symbol_text ();
}
while (**pp != ';' && **pp != '\0');