mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
* symfile.c (add_psymbol_to_bcache): Make 'psymbol' static again.
Zero the 'value' field.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2009-11-05 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* symfile.c (add_psymbol_to_bcache): Make 'psymbol' static again.
|
||||||
|
Zero the 'value' field.
|
||||||
|
|
||||||
2009-11-05 Doug Evans <dje@google.com>
|
2009-11-05 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* amd64-tdep.c (amd64_init_frame_cache): Enhance comment describing
|
* amd64-tdep.c (amd64_init_frame_cache): Enhance comment describing
|
||||||
|
@ -3105,9 +3105,15 @@ add_psymbol_to_bcache (char *name, int namelength, domain_enum domain,
|
|||||||
enum language language, struct objfile *objfile,
|
enum language language, struct objfile *objfile,
|
||||||
int *added)
|
int *added)
|
||||||
{
|
{
|
||||||
struct partial_symbol psymbol;
|
/* psymbol is static so that there will be no uninitialized gaps in the
|
||||||
|
structure which might contain random data, causing cache misses in
|
||||||
|
bcache. */
|
||||||
|
static struct partial_symbol psymbol;
|
||||||
|
|
||||||
memset (&psymbol, 0, sizeof (struct partial_symbol));
|
/* However, we must ensure that the entire 'value' field has been
|
||||||
|
zeroed before assigning to it, because an assignment may not
|
||||||
|
write the entire field. */
|
||||||
|
memset (&psymbol.ginfo.value, 0, sizeof (psymbol.ginfo.value));
|
||||||
/* val and coreaddr are mutually exclusive, one of them *will* be zero */
|
/* val and coreaddr are mutually exclusive, one of them *will* be zero */
|
||||||
if (val != 0)
|
if (val != 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user