2004-06-01 Michael Chastain <mec.gnu@mindspring.com>
Fix PR symtab/1661. * hpread.c (hpread_pxdb_needed): Call memset after alloca. (hpread_read_struct_type): Likewise.
This commit is contained in:
parent
0451f5dff4
commit
d4687fa094
|
@ -1,3 +1,9 @@
|
||||||
|
2004-06-01 Michael Chastain <mec.gnu@mindspring.com>
|
||||||
|
|
||||||
|
Fix PR symtab/1661.
|
||||||
|
* hpread.c (hpread_pxdb_needed): Call memset after alloca.
|
||||||
|
(hpread_read_struct_type): Likewise.
|
||||||
|
|
||||||
2004-06-01 Andrew Cagney <cagney@gnu.org>
|
2004-06-01 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
* mi/mi-cmd-env.c (env_execute_cli_command): Use xstrprintf
|
* mi/mi-cmd-env.c (env_execute_cli_command): Use xstrprintf
|
||||||
|
|
11
gdb/hpread.c
11
gdb/hpread.c
|
@ -383,6 +383,7 @@ hpread_pxdb_needed (bfd *sym_bfd)
|
||||||
if (header_section_size == (bfd_size_type) sizeof (DOC_info_PXDB_header))
|
if (header_section_size == (bfd_size_type) sizeof (DOC_info_PXDB_header))
|
||||||
{
|
{
|
||||||
buf = alloca (sizeof (DOC_info_PXDB_header));
|
buf = alloca (sizeof (DOC_info_PXDB_header));
|
||||||
|
memset (buf, 0, sizeof (DOC_info_PXDB_header));
|
||||||
|
|
||||||
if (!bfd_get_section_contents (sym_bfd,
|
if (!bfd_get_section_contents (sym_bfd,
|
||||||
header_section,
|
header_section,
|
||||||
|
@ -450,6 +451,7 @@ hpread_pxdb_needed (bfd *sym_bfd)
|
||||||
{
|
{
|
||||||
|
|
||||||
buf = alloca (sizeof (PXDB_header));
|
buf = alloca (sizeof (PXDB_header));
|
||||||
|
memset (buf, 0, sizeof (PXDB_header));
|
||||||
if (!bfd_get_section_contents (sym_bfd,
|
if (!bfd_get_section_contents (sym_bfd,
|
||||||
header_section,
|
header_section,
|
||||||
buf, 0,
|
buf, 0,
|
||||||
|
@ -3686,6 +3688,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
|
|
||||||
/* Get space to record the next field/data-member. */
|
/* Get space to record the next field/data-member. */
|
||||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||||
|
memset (new, 0, sizeof (struct nextfield));
|
||||||
new->next = list;
|
new->next = list;
|
||||||
list = new;
|
list = new;
|
||||||
|
|
||||||
|
@ -3764,6 +3767,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
n_templ_args++;
|
n_templ_args++;
|
||||||
/* Allocate and fill in a struct next_template */
|
/* Allocate and fill in a struct next_template */
|
||||||
t_new = (struct next_template *) alloca (sizeof (struct next_template));
|
t_new = (struct next_template *) alloca (sizeof (struct next_template));
|
||||||
|
memset (t_new, 0, sizeof (struct next_template));
|
||||||
t_new->next = t_list;
|
t_new->next = t_list;
|
||||||
t_list = t_new;
|
t_list = t_new;
|
||||||
t_list->arg.name = VT (objfile) + fieldp->dtempl_arg.name;
|
t_list->arg.name = VT (objfile) + fieldp->dtempl_arg.name;
|
||||||
|
@ -3904,6 +3908,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
/* Get space to record this member function */
|
/* Get space to record this member function */
|
||||||
/* Note: alloca used; this will disappear on routine exit */
|
/* Note: alloca used; this will disappear on routine exit */
|
||||||
fn_new = (struct next_fn_field *) alloca (sizeof (struct next_fn_field));
|
fn_new = (struct next_fn_field *) alloca (sizeof (struct next_fn_field));
|
||||||
|
memset (fn_new, 0, sizeof (struct next_fn_field));
|
||||||
fn_new->next = fn_list;
|
fn_new->next = fn_list;
|
||||||
fn_list = fn_new;
|
fn_list = fn_new;
|
||||||
|
|
||||||
|
@ -4021,6 +4026,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
|
|
||||||
/* Get space to record this static member */
|
/* Get space to record this static member */
|
||||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||||
|
memset (new, 0, sizeof (struct nextfield));
|
||||||
new->next = list;
|
new->next = list;
|
||||||
list = new;
|
list = new;
|
||||||
|
|
||||||
|
@ -4051,6 +4057,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
warning ("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set");
|
warning ("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set");
|
||||||
/* Get space to record the next field/data-member. */
|
/* Get space to record the next field/data-member. */
|
||||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||||
|
memset (new, 0, sizeof (struct nextfield));
|
||||||
new->next = list;
|
new->next = list;
|
||||||
list = new;
|
list = new;
|
||||||
|
|
||||||
|
@ -4082,6 +4089,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
warning ("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set");
|
warning ("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set");
|
||||||
/* Get space to record the next field/data-member. */
|
/* Get space to record the next field/data-member. */
|
||||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||||
|
memset (new, 0, sizeof (struct nextfield));
|
||||||
new->next = list;
|
new->next = list;
|
||||||
list = new;
|
list = new;
|
||||||
|
|
||||||
|
@ -4102,6 +4110,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
warning ("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set");
|
warning ("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set");
|
||||||
/* Get space to record the next field/data-member. */
|
/* Get space to record the next field/data-member. */
|
||||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||||
|
memset (new, 0, sizeof (struct nextfield));
|
||||||
new->next = list;
|
new->next = list;
|
||||||
list = new;
|
list = new;
|
||||||
|
|
||||||
|
@ -4150,6 +4159,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
|
|
||||||
/* Get space to record the next field/data-member. */
|
/* Get space to record the next field/data-member. */
|
||||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||||
|
memset (new, 0, sizeof (struct nextfield));
|
||||||
new->next = list;
|
new->next = list;
|
||||||
list = new;
|
list = new;
|
||||||
|
|
||||||
|
@ -4233,6 +4243,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
i_new = (struct next_instantiation *) alloca (sizeof (struct next_instantiation));
|
i_new = (struct next_instantiation *) alloca (sizeof (struct next_instantiation));
|
||||||
|
memset (i_new, 0, sizeof (struct next_instantiation));
|
||||||
i_new->next = i_list;
|
i_new->next = i_list;
|
||||||
i_list = i_new;
|
i_list = i_new;
|
||||||
i_list->t = hpread_type_lookup (field, objfile);
|
i_list->t = hpread_type_lookup (field, objfile);
|
||||||
|
|
Loading…
Reference in New Issue