projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Obsolete harris 88k target.
[deliverable/binutils-gdb.git]
/
gdb
/
stabsread.c
diff --git
a/gdb/stabsread.c
b/gdb/stabsread.c
index 09f02ce13329fb9417f73252cc23e3e3975abd0a..ad6719fc22717037b0a5abd62468473745e244ad 100644
(file)
--- a/
gdb/stabsread.c
+++ b/
gdb/stabsread.c
@@
-1,5
+1,6
@@
/* Support routines for decoding "stabs" debugging information format.
/* Support routines for decoding "stabs" debugging information format.
- Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+ 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GDB.
Free Software Foundation, Inc.
This file is part of GDB.
@@
-275,8
+276,7
@@
static struct type **os9k_type_vector[] =
static void os9k_init_type_vector (struct type **);
static void
static void os9k_init_type_vector (struct type **);
static void
-os9k_init_type_vector (tv)
- struct type **tv;
+os9k_init_type_vector (struct type **tv)
{
unsigned int i;
for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
{
unsigned int i;
for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
@@
-291,8
+291,7
@@
os9k_init_type_vector (tv)
or for associating a new type with the pair. */
struct type **
or for associating a new type with the pair. */
struct type **
-dbx_lookup_type (typenums)
- int typenums[2];
+dbx_lookup_type (int typenums[2])
{
register int filenum = typenums[0];
register int index = typenums[1];
{
register int filenum = typenums[0];
register int index = typenums[1];
@@
-399,9
+398,7
@@
Invalid symbol data: type number (%d,%d) out of range at symtab pos %d.",
put into the type vector, and so may not be referred to by number. */
static struct type *
put into the type vector, and so may not be referred to by number. */
static struct type *
-dbx_alloc_type (typenums, objfile)
- int typenums[2];
- struct objfile *objfile;
+dbx_alloc_type (int typenums[2], struct objfile *objfile)
{
register struct type **type_addr;
{
register struct type **type_addr;
@@
-427,10
+424,8
@@
dbx_alloc_type (typenums, objfile)
and fix their symbols in given symbol vector. */
static void
and fix their symbols in given symbol vector. */
static void
-patch_block_stabs (symbols, stabs, objfile)
- struct pending *symbols;
- struct pending_stabs *stabs;
- struct objfile *objfile;
+patch_block_stabs (struct pending *symbols, struct pending_stabs *stabs,
+ struct objfile *objfile)
{
int ii;
char *name;
{
int ii;
char *name;
@@
-517,9
+512,7
@@
patch_block_stabs (symbols, stabs, objfile)
Returns 0 for success, -1 for error. */
static int
Returns 0 for success, -1 for error. */
static int
-read_type_number (pp, typenums)
- register char **pp;
- register int *typenums;
+read_type_number (register char **pp, register int *typenums)
{
int nbits;
if (**pp == '(')
{
int nbits;
if (**pp == '(')
@@
-557,9
+550,7
@@
read_type_number (pp, typenums)
suibstring. */
static char *
suibstring. */
static char *
-get_substring (p, c)
- char **p;
- int c;
+get_substring (char **p, int c)
{
char *str;
str = *p;
{
char *str;
str = *p;
@@
-580,8
+571,7
@@
get_substring (p, c)
eg: for sname="a" and fname="foo__1aFPFs_i" return "FPFs_i" */
static char *
eg: for sname="a" and fname="foo__1aFPFs_i" return "FPFs_i" */
static char *
-get_cfront_method_physname (fname)
- char *fname;
+get_cfront_method_physname (char *fname)
{
int len = 0;
/* FIXME would like to make this generic for g++ too, but
{
int len = 0;
/* FIXME would like to make this generic for g++ too, but
@@
-617,11
+607,8
@@
get_cfront_method_physname (fname)
*/
static int
*/
static int
-read_cfront_baseclasses (fip, pp, type, objfile)
- struct field_info *fip;
- struct objfile *objfile;
- char **pp;
- struct type *type;
+read_cfront_baseclasses (struct field_info *fip, char **pp, struct type *type,
+ struct objfile *objfile)
{
static struct complaint msg_unknown =
{"\
{
static struct complaint msg_unknown =
{"\
@@
-668,7
+655,7
@@
read_cfront_baseclasses (fip, pp, type, objfile)
for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (free, new);
+ make_cleanup (
x
free, new);
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
@@
-770,11
+757,8
@@
read_cfront_baseclasses (fip, pp, type, objfile)
*/
static int
*/
static int
-read_cfront_member_functions (fip, pp, type, objfile)
- struct field_info *fip;
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_cfront_member_functions (struct field_info *fip, char **pp,
+ struct type *type, struct objfile *objfile)
{
/* This code extracted from read_member_functions
so as to do the similar thing for our funcs */
{
/* This code extracted from read_member_functions
so as to do the similar thing for our funcs */
@@
-831,7
+815,7
@@
read_cfront_member_functions (fip, pp, type, objfile)
new_fnlist = (struct next_fnfieldlist *)
xmalloc (sizeof (struct next_fnfieldlist));
new_fnlist = (struct next_fnfieldlist *)
xmalloc (sizeof (struct next_fnfieldlist));
- make_cleanup (free, new_fnlist);
+ make_cleanup (
x
free, new_fnlist);
memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
/* The following is code to work around cfront generated stabs.
memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
/* The following is code to work around cfront generated stabs.
@@
-874,7
+858,7
@@
read_cfront_member_functions (fip, pp, type, objfile)
new_sublist =
(struct next_fnfield *) xmalloc (sizeof (struct next_fnfield));
new_sublist =
(struct next_fnfield *) xmalloc (sizeof (struct next_fnfield));
- make_cleanup (free, new_sublist);
+ make_cleanup (
x
free, new_sublist);
memset (new_sublist, 0, sizeof (struct next_fnfield));
/* eat 1; from :;2A.; */
memset (new_sublist, 0, sizeof (struct next_fnfield));
/* eat 1; from :;2A.; */
@@
-978,10
+962,8
@@
read_cfront_member_functions (fip, pp, type, objfile)
to add information such as methods to classes.
Examples of "p": "sA;;__ct__1AFv foo__1AFv ;;;" */
int
to add information such as methods to classes.
Examples of "p": "sA;;__ct__1AFv foo__1AFv ;;;" */
int
-resolve_cfront_continuation (objfile, sym, p)
- struct objfile *objfile;
- struct symbol *sym;
- char *p;
+resolve_cfront_continuation (struct objfile *objfile, struct symbol *sym,
+ char *p)
{
struct symbol *ref_sym = 0;
char *sname;
{
struct symbol *ref_sym = 0;
char *sname;
@@
-1050,10
+1032,7
@@
resolve_cfront_continuation (objfile, sym, p)
symbol definition. Returns 0 on failure, non-zero on success. */
static int
symbol definition. Returns 0 on failure, non-zero on success. */
static int
-resolve_symbol_reference (objfile, sym, p)
- struct objfile *objfile;
- struct symbol *sym;
- char *p;
+resolve_symbol_reference (struct objfile *objfile, struct symbol *sym, char *p)
{
int refnum;
struct symbol *ref_sym = 0;
{
int refnum;
struct symbol *ref_sym = 0;
@@
-1178,7
+1157,7
@@
static int ref_chunk = 0;
table. If the symbol table changes, this cache must be cleared
or we are left holding onto data in invalid obstacks. */
void
table. If the symbol table changes, this cache must be cleared
or we are left holding onto data in invalid obstacks. */
void
-stabsread_clear_cache ()
+stabsread_clear_cache (
void
)
{
ref_count = 0;
ref_chunk = 0;
{
ref_count = 0;
ref_chunk = 0;
@@
-1189,11
+1168,7
@@
stabsread_clear_cache ()
find them, using their reference numbers as our index.
These will be used later when we resolve references. */
void
find them, using their reference numbers as our index.
These will be used later when we resolve references. */
void
-ref_add (refnum, sym, stabs, value)
- int refnum;
- struct symbol *sym;
- char *stabs;
- CORE_ADDR value;
+ref_add (int refnum, struct symbol *sym, char *stabs, CORE_ADDR value)
{
if (ref_count == 0)
ref_chunk = 0;
{
if (ref_count == 0)
ref_chunk = 0;
@@
-1215,8
+1190,7
@@
ref_add (refnum, sym, stabs, value)
/* Return defined sym for the reference REFNUM. */
struct symbol *
/* Return defined sym for the reference REFNUM. */
struct symbol *
-ref_search (refnum)
- int refnum;
+ref_search (int refnum)
{
if (refnum < 0 || refnum > ref_count)
return 0;
{
if (refnum < 0 || refnum > ref_count)
return 0;
@@
-1226,8
+1200,7
@@
ref_search (refnum)
/* Return value for the reference REFNUM. */
static CORE_ADDR
/* Return value for the reference REFNUM. */
static CORE_ADDR
-ref_search_value (refnum)
- int refnum;
+ref_search_value (int refnum)
{
if (refnum < 0 || refnum > ref_count)
return 0;
{
if (refnum < 0 || refnum > ref_count)
return 0;
@@
-1238,8
+1211,7
@@
ref_search_value (refnum)
reference number. Move STRING beyond the reference id. */
static int
reference number. Move STRING beyond the reference id. */
static int
-process_reference (string)
- char **string;
+process_reference (char **string)
{
char *p;
int refnum = 0;
{
char *p;
int refnum = 0;
@@
-1264,8
+1236,7
@@
process_reference (string)
definition for later use. Return the reference number. */
int
definition for later use. Return the reference number. */
int
-symbol_reference_defined (string)
- char **string;
+symbol_reference_defined (char **string)
{
char *p = *string;
int refnum = 0;
{
char *p = *string;
int refnum = 0;
@@
-1290,12
+1261,8
@@
symbol_reference_defined (string)
/* ARGSUSED */
struct symbol *
/* ARGSUSED */
struct symbol *
-define_symbol (valu, string, desc, type, objfile)
- CORE_ADDR valu;
- char *string;
- int desc;
- int type;
- struct objfile *objfile;
+define_symbol (CORE_ADDR valu, char *string, int desc, int type,
+ struct objfile *objfile)
{
register struct symbol *sym;
char *p = (char *) strchr (string, ':');
{
register struct symbol *sym;
char *p = (char *) strchr (string, ':');
@@
-1987,6
+1954,27
@@
define_symbol (valu, string, desc, type, objfile)
Fortunately, this check seems not to be necessary
for anything except pointers or functions. */
Fortunately, this check seems not to be necessary
for anything except pointers or functions. */
+ /* ezannoni: 2000-10-26. This seems to apply for
+ versions of gcc older than 2.8. This was the original
+ problem: with the following code gdb would tell that
+ the type for name1 is caddr_t, and func is char()
+ typedef char *caddr_t;
+ char *name2;
+ struct x
+ {
+ char *name1;
+ } xx;
+ char *func()
+ {
+ }
+ main () {}
+ */
+
+ /* Pascal accepts names for pointer types. */
+ if (current_subfile->language == language_pascal)
+ {
+ TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);
+ }
}
else
TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);
}
else
TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);
@@
-2189,10
+2177,7
@@
define_symbol (valu, string, desc, type, objfile)
non-zero on success, zero otherwise. */
static int
non-zero on success, zero otherwise. */
static int
-resolve_live_range (objfile, sym, p)
- struct objfile *objfile;
- struct symbol *sym;
- char *p;
+resolve_live_range (struct objfile *objfile, struct symbol *sym, char *p)
{
int refnum;
CORE_ADDR start, end;
{
int refnum;
CORE_ADDR start, end;
@@
-2260,10
+2245,8
@@
resolve_live_range (objfile, sym, p)
in objfile OBJFILE. */
static void
in objfile OBJFILE. */
static void
-add_live_range (objfile, sym, start, end)
- struct objfile *objfile;
- struct symbol *sym;
- CORE_ADDR start, end;
+add_live_range (struct objfile *objfile, struct symbol *sym, CORE_ADDR start,
+ CORE_ADDR end)
{
struct range_list *r, *rs;
{
struct range_list *r, *rs;
@@
-2324,9
+2307,7
@@
add_live_range (objfile, sym, start, end)
debugger will be able to read the new symbol tables. */
static struct type *
debugger will be able to read the new symbol tables. */
static struct type *
-error_type (pp, objfile)
- char **pp;
- struct objfile *objfile;
+error_type (char **pp, struct objfile *objfile)
{
complain (&error_type_complaint);
while (1)
{
complain (&error_type_complaint);
while (1)
@@
-2358,9
+2339,7
@@
error_type (pp, objfile)
deciding whether to call read_type. */
struct type *
deciding whether to call read_type. */
struct type *
-read_type (pp, objfile)
- register char **pp;
- struct objfile *objfile;
+read_type (register char **pp, struct objfile *objfile)
{
register struct type *type = 0;
struct type *type1;
{
register struct type *type = 0;
struct type *type1;
@@
-2790,8
+2769,7
@@
again:
Return the proper type node for a given builtin type number. */
static struct type *
Return the proper type node for a given builtin type number. */
static struct type *
-rs6000_builtin_type (typenum)
- int typenum;
+rs6000_builtin_type (int typenum)
{
/* We recognize types numbered from -NUMBER_RECOGNIZED to -1. */
#define NUMBER_RECOGNIZED 34
{
/* We recognize types numbered from -NUMBER_RECOGNIZED to -1. */
#define NUMBER_RECOGNIZED 34
@@
-2966,11
+2944,8
@@
rs6000_builtin_type (typenum)
Returns 1 for success, 0 for failure. */
static int
Returns 1 for success, 0 for failure. */
static int
-read_member_functions (fip, pp, type, objfile)
- struct field_info *fip;
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_member_functions (struct field_info *fip, char **pp, struct type *type,
+ struct objfile *objfile)
{
int nfn_fields = 0;
int length = 0;
{
int nfn_fields = 0;
int length = 0;
@@
-3015,7
+2990,7
@@
read_member_functions (fip, pp, type, objfile)
new_fnlist = (struct next_fnfieldlist *)
xmalloc (sizeof (struct next_fnfieldlist));
new_fnlist = (struct next_fnfieldlist *)
xmalloc (sizeof (struct next_fnfieldlist));
- make_cleanup (free, new_fnlist);
+ make_cleanup (
x
free, new_fnlist);
memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
if ((*pp)[0] == 'o' && (*pp)[1] == 'p' && is_cplus_marker ((*pp)[2]))
memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
if ((*pp)[0] == 'o' && (*pp)[1] == 'p' && is_cplus_marker ((*pp)[2]))
@@
-3058,7
+3033,7
@@
read_member_functions (fip, pp, type, objfile)
{
new_sublist =
(struct next_fnfield *) xmalloc (sizeof (struct next_fnfield));
{
new_sublist =
(struct next_fnfield *) xmalloc (sizeof (struct next_fnfield));
- make_cleanup (free, new_sublist);
+ make_cleanup (
x
free, new_sublist);
memset (new_sublist, 0, sizeof (struct next_fnfield));
/* Check for and handle cretinous dbx symbol name continuation! */
memset (new_sublist, 0, sizeof (struct next_fnfield));
/* Check for and handle cretinous dbx symbol name continuation! */
@@
-3260,11
+3235,8
@@
read_member_functions (fip, pp, type, objfile)
keep parsing and it's time for error_type(). */
static int
keep parsing and it's time for error_type(). */
static int
-read_cpp_abbrev (fip, pp, type, objfile)
- struct field_info *fip;
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_cpp_abbrev (struct field_info *fip, char **pp, struct type *type,
+ struct objfile *objfile)
{
register char *p;
char *name;
{
register char *p;
char *name;
@@
-3349,12
+3321,8
@@
read_cpp_abbrev (fip, pp, type, objfile)
}
static void
}
static void
-read_one_struct_field (fip, pp, p, type, objfile)
- struct field_info *fip;
- char **pp;
- char *p;
- struct type *type;
- struct objfile *objfile;
+read_one_struct_field (struct field_info *fip, char **pp, char *p,
+ struct type *type, struct objfile *objfile)
{
/* The following is code to work around cfront generated stabs.
The stabs contains full mangled name for each field.
{
/* The following is code to work around cfront generated stabs.
The stabs contains full mangled name for each field.
@@
-3520,11
+3488,8
@@
read_one_struct_field (fip, pp, p, type, objfile)
Returns 1 for success, 0 for failure. */
static int
Returns 1 for success, 0 for failure. */
static int
-read_struct_fields (fip, pp, type, objfile)
- struct field_info *fip;
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_struct_fields (struct field_info *fip, char **pp, struct type *type,
+ struct objfile *objfile)
{
register char *p;
struct nextfield *new;
{
register char *p;
struct nextfield *new;
@@
-3544,7
+3509,7
@@
read_struct_fields (fip, pp, type, objfile)
STABS_CONTINUE (pp, objfile);
/* Get space to record the next field's data. */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
STABS_CONTINUE (pp, objfile);
/* Get space to record the next field's data. */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (free, new);
+ make_cleanup (
x
free, new);
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
@@
-3620,11
+3585,8
@@
read_struct_fields (fip, pp, type, objfile)
static int
static int
-read_baseclasses (fip, pp, type, objfile)
- struct field_info *fip;
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_baseclasses (struct field_info *fip, char **pp, struct type *type,
+ struct objfile *objfile)
{
int i;
struct nextfield *new;
{
int i;
struct nextfield *new;
@@
-3667,7
+3629,7
@@
read_baseclasses (fip, pp, type, objfile)
for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (free, new);
+ make_cleanup (
x
free, new);
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
@@
-3750,11
+3712,8
@@
read_baseclasses (fip, pp, type, objfile)
so we can look for the vptr base class info. */
static int
so we can look for the vptr base class info. */
static int
-read_tilde_fields (fip, pp, type, objfile)
- struct field_info *fip;
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_tilde_fields (struct field_info *fip, char **pp, struct type *type,
+ struct objfile *objfile)
{
register char *p;
{
register char *p;
@@
-3832,9
+3791,7
@@
read_tilde_fields (fip, pp, type, objfile)
}
static int
}
static int
-attach_fn_fields_to_type (fip, type)
- struct field_info *fip;
- register struct type *type;
+attach_fn_fields_to_type (struct field_info *fip, register struct type *type)
{
register int n;
{
register int n;
@@
-3858,11
+3815,8
@@
attach_fn_fields_to_type (fip, type)
*/
static int
*/
static int
-read_cfront_static_fields (fip, pp, type, objfile)
- struct field_info *fip;
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_cfront_static_fields (struct field_info *fip, char **pp, struct type *type,
+ struct objfile *objfile)
{
struct nextfield *new;
struct type *stype;
{
struct nextfield *new;
struct type *stype;
@@
-3895,7
+3849,7
@@
read_cfront_static_fields (fip, pp, type, objfile)
/* allocate a new fip */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
/* allocate a new fip */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (free, new);
+ make_cleanup (
x
free, new);
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
@@
-3944,10
+3898,8
@@
read_cfront_static_fields (fip, pp, type, objfile)
once we have collected all the class members. */
static int
once we have collected all the class members. */
static int
-copy_cfront_struct_fields (fip, type, objfile)
- struct field_info *fip;
- struct type *type;
- struct objfile *objfile;
+copy_cfront_struct_fields (struct field_info *fip, struct type *type,
+ struct objfile *objfile)
{
int nfields = TYPE_NFIELDS (type);
int i;
{
int nfields = TYPE_NFIELDS (type);
int i;
@@
-3960,7
+3912,7
@@
copy_cfront_struct_fields (fip, type, objfile)
{
/* allocate a new fip */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
{
/* allocate a new fip */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
- make_cleanup (free, new);
+ make_cleanup (
x
free, new);
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
memset (new, 0, sizeof (struct nextfield));
new->next = fip->list;
fip->list = new;
@@
-3991,10
+3943,8
@@
copy_cfront_struct_fields (fip, type, objfile)
for this class's virtual functions. */
static int
for this class's virtual functions. */
static int
-attach_fields_to_type (fip, type, objfile)
- struct field_info *fip;
- register struct type *type;
- struct objfile *objfile;
+attach_fields_to_type (struct field_info *fip, register struct type *type,
+ struct objfile *objfile)
{
register int nfields = 0;
register int non_public_fields = 0;
{
register int nfields = 0;
register int non_public_fields = 0;
@@
-4094,10
+4044,7
@@
attach_fields_to_type (fip, type, objfile)
*/
static struct type *
*/
static struct type *
-read_struct_type (pp, type, objfile)
- char **pp;
- struct type *type;
- struct objfile *objfile;
+read_struct_type (char **pp, struct type *type, struct objfile *objfile)
{
struct cleanup *back_to;
struct field_info fi;
{
struct cleanup *back_to;
struct field_info fi;
@@
-4144,10
+4091,8
@@
read_struct_type (pp, type, objfile)
array. */
static struct type *
array. */
static struct type *
-read_array_type (pp, type, objfile)
- register char **pp;
- register struct type *type;
- struct objfile *objfile;
+read_array_type (register char **pp, register struct type *type,
+ struct objfile *objfile)
{
struct type *index_type, *element_type, *range_type;
int lower, upper;
{
struct type *index_type, *element_type, *range_type;
int lower, upper;
@@
-4211,10
+4156,8
@@
read_array_type (pp, type, objfile)
Also defines the symbols that represent the values of the type. */
static struct type *
Also defines the symbols that represent the values of the type. */
static struct type *
-read_enum_type (pp, type, objfile)
- register char **pp;
- register struct type *type;
- struct objfile *objfile;
+read_enum_type (register char **pp, register struct type *type,
+ struct objfile *objfile)
{
register char *p;
char *name;
{
register char *p;
char *name;
@@
-4346,10
+4289,7
@@
read_enum_type (pp, type, objfile)
FIXME. */
static struct type *
FIXME. */
static struct type *
-read_sun_builtin_type (pp, typenums, objfile)
- char **pp;
- int typenums[2];
- struct objfile *objfile;
+read_sun_builtin_type (char **pp, int typenums[2], struct objfile *objfile)
{
int type_bits;
int nbits;
{
int type_bits;
int nbits;
@@
-4421,10
+4361,7
@@
read_sun_builtin_type (pp, typenums, objfile)
}
static struct type *
}
static struct type *
-read_sun_floating_type (pp, typenums, objfile)
- char **pp;
- int typenums[2];
- struct objfile *objfile;
+read_sun_floating_type (char **pp, int typenums[2], struct objfile *objfile)
{
int nbits;
int details;
{
int nbits;
int details;
@@
-4463,10
+4400,7
@@
read_sun_floating_type (pp, typenums, objfile)
If encounter garbage, set *BITS to -1 and return 0. */
static long
If encounter garbage, set *BITS to -1 and return 0. */
static long
-read_huge_number (pp, end, bits)
- char **pp;
- int end;
- int *bits;
+read_huge_number (char **pp, int end, int *bits)
{
char *p = *pp;
int sign = 1;
{
char *p = *pp;
int sign = 1;
@@
-4568,10
+4502,7
@@
read_huge_number (pp, end, bits)
}
static struct type *
}
static struct type *
-read_range_type (pp, typenums, objfile)
- char **pp;
- int typenums[2];
- struct objfile *objfile;
+read_range_type (char **pp, int typenums[2], struct objfile *objfile)
{
char *orig_pp = *pp;
int rangenums[2];
{
char *orig_pp = *pp;
int rangenums[2];
@@
-4663,14
+4594,18
@@
read_range_type (pp, typenums, objfile)
if (n3 == 0 && n2 > 0)
{
if (n3 == 0 && n2 > 0)
{
+ struct type *float_type
+ = init_type (TYPE_CODE_FLT, n2, 0, NULL, objfile);
+
if (self_subrange)
{
if (self_subrange)
{
- return init_type (TYPE_CODE_COMPLEX, 2 * n2, 0, NULL, objfile);
+ struct type *complex_type =
+ init_type (TYPE_CODE_COMPLEX, 2 * n2, 0, NULL, objfile);
+ TYPE_TARGET_TYPE (complex_type) = float_type;
+ return complex_type;
}
else
}
else
- {
- return init_type (TYPE_CODE_FLT, n2, 0, NULL, objfile);
- }
+ return float_type;
}
/* If the upper bound is -1, it must really be an unsigned int. */
}
/* If the upper bound is -1, it must really be an unsigned int. */
@@
-4770,10
+4705,7
@@
handle_true_range:
**)-1 if there is an error. */
static struct type **
**)-1 if there is an error. */
static struct type **
-read_args (pp, end, objfile)
- char **pp;
- int end;
- struct objfile *objfile;
+read_args (char **pp, int end, struct objfile *objfile)
{
/* FIXME! Remove this arbitrary limit! */
struct type *types[1024], **rval; /* allow for fns of 1023 parameters */
{
/* FIXME! Remove this arbitrary limit! */
struct type *types[1024], **rval; /* allow for fns of 1023 parameters */
@@
-4827,9
+4759,7
@@
static char *common_block_name;
to remain after this function returns. */
void
to remain after this function returns. */
void
-common_block_start (name, objfile)
- char *name;
- struct objfile *objfile;
+common_block_start (char *name, struct objfile *objfile)
{
if (common_block_name != NULL)
{
{
if (common_block_name != NULL)
{
@@
-4848,8
+4778,7
@@
common_block_start (name, objfile)
/* Process a N_ECOMM symbol. */
void
/* Process a N_ECOMM symbol. */
void
-common_block_end (objfile)
- struct objfile *objfile;
+common_block_end (struct objfile *objfile)
{
/* Symbols declared since the BCOMM are to have the common block
start address added in when we know it. common_block and
{
/* Symbols declared since the BCOMM are to have the common block
start address added in when we know it. common_block and
@@
-4912,9
+4841,7
@@
common_block_end (objfile)
the common block name). */
static void
the common block name). */
static void
-fix_common_block (sym, valu)
- struct symbol *sym;
- int valu;
+fix_common_block (struct symbol *sym, int valu)
{
struct pending *next = (struct pending *) SYMBOL_TYPE (sym);
for (; next; next = next->next)
{
struct pending *next = (struct pending *) SYMBOL_TYPE (sym);
for (; next; next = next->next)
@@
-4933,8
+4860,7
@@
fix_common_block (sym, valu)
once this file has been read in. */
void
once this file has been read in. */
void
-add_undefined_type (type)
- struct type *type;
+add_undefined_type (struct type *type)
{
if (undef_types_length == undef_types_allocated)
{
{
if (undef_types_length == undef_types_allocated)
{
@@
-4956,7
+4882,7
@@
add_undefined_type (type)
yet defined at the time a pointer to it was made.
Fix: Do a full lookup on the struct/union tag. */
void
yet defined at the time a pointer to it was made.
Fix: Do a full lookup on the struct/union tag. */
void
-cleanup_undefined_types ()
+cleanup_undefined_types (
void
)
{
struct type **type;
{
struct type **type;
@@
-5027,8
+4953,7
@@
GDB internal error. cleanup_undefined_types with bad type %d.", 0, 0};
to. Get these symbols from the minimal symbol table. */
void
to. Get these symbols from the minimal symbol table. */
void
-scan_file_globals (objfile)
- struct objfile *objfile;
+scan_file_globals (struct objfile *objfile)
{
int hash;
struct minimal_symbol *msymbol;
{
int hash;
struct minimal_symbol *msymbol;
@@
-5186,7
+5111,7
@@
scan_file_globals (objfile)
to a psymtab. */
void
to a psymtab. */
void
-stabsread_init ()
+stabsread_init (
void
)
{
}
{
}
@@
-5195,7
+5120,7
@@
stabsread_init ()
file, e.g. a shared library). */
void
file, e.g. a shared library). */
void
-stabsread_new_init ()
+stabsread_new_init (
void
)
{
/* Empty the hash table of global syms looking for values. */
memset (global_sym_chain, 0, sizeof (global_sym_chain));
{
/* Empty the hash table of global syms looking for values. */
memset (global_sym_chain, 0, sizeof (global_sym_chain));
@@
-5205,7
+5130,7
@@
stabsread_new_init ()
start_symtab() is called. */
void
start_symtab() is called. */
void
-start_stabs ()
+start_stabs (
void
)
{
global_stabs = NULL; /* AIX COFF */
/* Leave FILENUM of 0 free for builtin types and this file's types. */
{
global_stabs = NULL; /* AIX COFF */
/* Leave FILENUM of 0 free for builtin types and this file's types. */
@@
-5222,11
+5147,11
@@
start_stabs ()
/* Call after end_symtab() */
void
/* Call after end_symtab() */
void
-end_stabs ()
+end_stabs (
void
)
{
if (type_vector)
{
{
if (type_vector)
{
-
free ((char *)
type_vector);
+
xfree (
type_vector);
}
type_vector = 0;
type_vector_length = 0;
}
type_vector = 0;
type_vector_length = 0;
@@
-5234,13
+5159,12
@@
end_stabs ()
}
void
}
void
-finish_global_stabs (objfile)
- struct objfile *objfile;
+finish_global_stabs (struct objfile *objfile)
{
if (global_stabs)
{
patch_block_stabs (global_symbols, global_stabs, objfile);
{
if (global_stabs)
{
patch_block_stabs (global_symbols, global_stabs, objfile);
-
free ((PTR)
global_stabs);
+
xfree (
global_stabs);
global_stabs = NULL;
}
}
global_stabs = NULL;
}
}
@@
-5248,7
+5172,7
@@
finish_global_stabs (objfile)
/* Initializer for this module */
void
/* Initializer for this module */
void
-_initialize_stabsread ()
+_initialize_stabsread (
void
)
{
undef_types_allocated = 20;
undef_types_length = 0;
{
undef_types_allocated = 20;
undef_types_length = 0;
This page took
0.050271 seconds
and
4
git commands to generate.