summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2002-01-20 19:12:23 +0000
committerDaniel Jacobowitz <dan@debian.org>2002-01-20 19:12:23 +0000
commit2bdbd424bf807072d1e0ceda73b3dea8935ea94d (patch)
treedf88c1401f0441cade6af408c1628a3775a9674c /gdb
parent3d891f56c452ff2c5e704e83280decde41c6d560 (diff)
downloadgdb-2bdbd424bf807072d1e0ceda73b3dea8935ea94d.tar.gz
2002-01-15 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (struct type): Fix whitespace. Remove obsolete comment. Add ``artificial'' to ``union field_location''. * dwarf2read.c: Remove ad-hoc TYPE_FIELD_ARTIFICIAL. * buildsym.c (finish_block): Initialize TYPE_FIELD_ARTIFICIAL to 0. * mdebugread.c (parse_symbol): Likewise. * stabsread.c (define_symbol): Likewise. * hp-symtab-read.c (hpread_function_type): Likewise, instead of initializing TYPE_FIELD_BITPOS to n (obsolete). (hpread_doc_function_type): Likewise. * hpread.c (hpread_function_type): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/buildsym.c1
-rw-r--r--gdb/dwarf2read.c7
-rw-r--r--gdb/gdbtypes.h12
-rw-r--r--gdb/hp-symtab-read.c4
-rw-r--r--gdb/hpread.c2
-rw-r--r--gdb/mdebugread.c1
-rw-r--r--gdb/stabsread.c3
8 files changed, 29 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e3f1bb23ea8..0fa3015c4d2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,18 @@
+2002-01-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (struct type): Fix whitespace. Remove obsolete
+ comment. Add ``artificial'' to ``union field_location''.
+
+ * dwarf2read.c: Remove ad-hoc TYPE_FIELD_ARTIFICIAL.
+
+ * buildsym.c (finish_block): Initialize TYPE_FIELD_ARTIFICIAL to 0.
+ * mdebugread.c (parse_symbol): Likewise.
+ * stabsread.c (define_symbol): Likewise.
+ * hp-symtab-read.c (hpread_function_type): Likewise, instead of
+ initializing TYPE_FIELD_BITPOS to n (obsolete).
+ (hpread_doc_function_type): Likewise.
+ * hpread.c (hpread_function_type): Likewise.
+
2002-01-20 Andrew Cagney <ac131313@redhat.com>
* configure.in (host_makefile_frag): Only require a host makefile
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index a2c92f2a6fb..abcf22a7cc4 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -322,6 +322,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
case LOC_BASEREG_ARG:
case LOC_LOCAL_ARG:
TYPE_FIELD_TYPE (ftype, iparams) = SYMBOL_TYPE (sym);
+ TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
iparams++;
break;
case LOC_UNDEF:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 785acc24ca7..b0b401ee373 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -474,13 +474,6 @@ struct field_info
int nfnfields;
};
-/* Dwarf2 has no clean way to discern C++ static and non-static member
- functions. G++ helps GDB by marking the first parameter for non-static
- member functions (which is the this pointer) as artificial.
- We pass this information between dwarf2_add_member_fn and
- read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */
-#define TYPE_FIELD_ARTIFICIAL TYPE_FIELD_BITPOS
-
/* Various complaints about symbol reading that don't abort the process */
static struct complaint dwarf2_const_ignored =
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 8ceed9d7940..3cb561348d3 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -383,17 +383,12 @@ struct type
struct field
{
-
-
-
union field_location
{
/* Position of this field, counting in bits from start of
containing structure.
For BITS_BIG_ENDIAN=1 targets, it is the bit offset to the MSB.
For BITS_BIG_ENDIAN=0 targets, it is the bit offset to the LSB.
- For a function type, this is the position in the argument list
- of this argument.
For a range bound or enum value, this is the value itself. */
int bitpos;
@@ -404,6 +399,11 @@ struct type
CORE_ADDR physaddr;
char *physname;
+
+ /* For a function type, this is 1 if the argument is marked
+ artificial. Artificial arguments should not be shown to the
+ user. */
+ int artificial;
}
loc;
@@ -796,6 +796,7 @@ extern void allocate_cplus_struct_type (struct type *);
#define FIELD_TYPE(thisfld) ((thisfld).type)
#define FIELD_NAME(thisfld) ((thisfld).name)
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
+#define FIELD_ARTIFICIAL(thisfld) ((thisfld).loc.artificial)
#define FIELD_BITSIZE(thisfld) ((thisfld).bitsize)
#define FIELD_PHYSNAME(thisfld) ((thisfld).loc.physname)
#define FIELD_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
@@ -807,6 +808,7 @@ extern void allocate_cplus_struct_type (struct type *);
#define TYPE_FIELD_TYPE(thistype, n) FIELD_TYPE(TYPE_FIELD(thistype, n))
#define TYPE_FIELD_NAME(thistype, n) FIELD_NAME(TYPE_FIELD(thistype, n))
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS(TYPE_FIELD(thistype,n))
+#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
#define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE(TYPE_FIELD(thistype,n))!=0)
#define TYPE_TEMPLATE_ARG(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->template_args[n]
diff --git a/gdb/hp-symtab-read.c b/gdb/hp-symtab-read.c
index 57665ffff37..15320df45d7 100644
--- a/gdb/hp-symtab-read.c
+++ b/gdb/hp-symtab-read.c
@@ -965,7 +965,7 @@ hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
struct symbol *xsym = syms->symbol[j];
TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
- TYPE_FIELD_BITPOS (type, n) = n;
+ TYPE_FIELD_ARTIFICIAL (type, n) = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
}
}
@@ -1138,7 +1138,7 @@ hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
struct symbol *xsym = syms->symbol[j];
TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
- TYPE_FIELD_BITPOS (type, n) = n;
+ TYPE_FIELD_ARTIFICIAL (type, n) = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
}
}
diff --git a/gdb/hpread.c b/gdb/hpread.c
index f044ebe824a..4cbeddda440 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -1371,7 +1371,7 @@ hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
struct symbol *xsym = syms->symbol[j];
TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
- TYPE_FIELD_BITPOS (type, n) = n;
+ TYPE_FIELD_ARTIFICIAL (type, n) = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
}
if (syms == osyms)
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 13c0417f134..7bae479d7f3 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1282,6 +1282,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
TYPE_FIELD_TYPE (ftype, iparams) = SYMBOL_TYPE (sym);
+ TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
iparams++;
break;
default:
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 45075a62096..62b8bfecb27 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1628,7 +1628,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
FIXME: Do we need a new builtin_type_promoted_int_arg ? */
if (TYPE_CODE (ptype) == TYPE_CODE_VOID)
ptype = builtin_type_int;
- TYPE_FIELD_TYPE (ftype, nparams++) = ptype;
+ TYPE_FIELD_TYPE (ftype, nparams) = ptype;
+ TYPE_FIELD_ARTIFICIAL (ftype, nparams++) = 0;
}
TYPE_NFIELDS (ftype) = nparams;
TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED;