summaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 900344287bf..650d424f76d 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -398,8 +398,8 @@ patch_block_stabs (struct pending *symbols, struct pending_stabs *stabs,
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT;
SYMBOL_SET_LINKAGE_NAME
- (sym, obstack_copy0 (&objfile->objfile_obstack,
- name, pp - name));
+ (sym, (char *) obstack_copy0 (&objfile->objfile_obstack,
+ name, pp - name));
pp += 2;
if (*(pp - 1) == 'F' || *(pp - 1) == 'f')
{
@@ -716,7 +716,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
normal:
if (SYMBOL_LANGUAGE (sym) == language_cplus)
{
- char *name = alloca (p - string + 1);
+ char *name = (char *) alloca (p - string + 1);
memcpy (name, string, p - string);
name[p - string] = '\0';
@@ -784,9 +784,9 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
probably has the necessary code. */
dbl_type = objfile_type (objfile)->builtin_double;
- dbl_valu =
- obstack_alloc (&objfile->objfile_obstack,
- TYPE_LENGTH (dbl_type));
+ dbl_valu
+ = (gdb_byte *) obstack_alloc (&objfile->objfile_obstack,
+ TYPE_LENGTH (dbl_type));
store_typed_floating (dbl_valu, dbl_type, d);
SYMBOL_TYPE (sym) = dbl_type;
@@ -868,7 +868,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
SYMBOL_TYPE (sym) = create_array_type (NULL,
objfile_type (objfile)->builtin_char,
range_type);
- string_value = obstack_alloc (&objfile->objfile_obstack, ind + 1);
+ string_value
+ = (gdb_byte *) obstack_alloc (&objfile->objfile_obstack, ind + 1);
memcpy (string_value, string_local, ind + 1);
p++;
@@ -1622,15 +1623,16 @@ again:
type_name = NULL;
if (current_subfile->language == language_cplus)
{
- char *new_name, *name = alloca (p - *pp + 1);
+ char *new_name, *name = (char *) alloca (p - *pp + 1);
memcpy (name, *pp, p - *pp);
name[p - *pp] = '\0';
new_name = cp_canonicalize_string (name);
if (new_name != NULL)
{
- type_name = obstack_copy0 (&objfile->objfile_obstack,
- new_name, strlen (new_name));
+ type_name
+ = (char *) obstack_copy0 (&objfile->objfile_obstack,
+ new_name, strlen (new_name));
xfree (new_name);
}
}
@@ -2711,8 +2713,9 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
dem_opname, 0);
if (ret)
new_fnlist->fn_fieldlist.name
- = obstack_copy0 (&objfile->objfile_obstack,
- dem_opname, strlen (dem_opname));
+ = ((const char *)
+ obstack_copy0 (&objfile->objfile_obstack, dem_opname,
+ strlen (dem_opname)));
xfree (main_fn_name);
}
@@ -2853,8 +2856,8 @@ read_one_struct_field (struct field_info *fip, char **pp, char *p,
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- fip->list->field.name =
- obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
+ fip->list->field.name
+ = (const char *) obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
*pp = p + 1;
/* This means we have a visibility for a field coming. */
@@ -3676,7 +3679,7 @@ read_enum_type (char **pp, struct type *type,
p = *pp;
while (*p != ':')
p++;
- name = obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
+ name = (char *) obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
*pp = p + 1;
n = read_huge_number (pp, ',', &nbits, 0);
if (nbits != 0)
@@ -4329,8 +4332,8 @@ common_block_start (char *name, struct objfile *objfile)
}
common_block = local_symbols;
common_block_i = local_symbols ? local_symbols->nsyms : 0;
- common_block_name = obstack_copy0 (&objfile->objfile_obstack,
- name, strlen (name));
+ common_block_name = (char *) obstack_copy0 (&objfile->objfile_obstack, name,
+ strlen (name));
}
/* Process a N_ECOMM symbol. */