mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 05:47:26 +08:00
* symfile.c (add_psymbol_to_bcache): Don't copy name. Make
'psymbol' non-static.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2009-11-04 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* symfile.c (add_psymbol_to_bcache): Don't copy name. Make
|
||||||
|
'psymbol' non-static.
|
||||||
|
|
||||||
2009-11-03 Paul Pluzhnikov <ppluzhnikov@google.com>
|
2009-11-03 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||||
|
|
||||||
* linux-thread-db.c (disable_thread_event_reporting): Adjust.
|
* linux-thread-db.c (disable_thread_event_reporting): Adjust.
|
||||||
|
@ -3106,19 +3106,9 @@ 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)
|
||||||
{
|
{
|
||||||
char *buf = name;
|
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
|
memset (&psymbol, 0, sizeof (struct partial_symbol));
|
||||||
bcache. */
|
|
||||||
static struct partial_symbol psymbol;
|
|
||||||
|
|
||||||
if (name[namelength] != '\0')
|
|
||||||
{
|
|
||||||
buf = alloca (namelength + 1);
|
|
||||||
/* Create local copy of the partial symbol */
|
|
||||||
memcpy (buf, name, namelength);
|
|
||||||
buf[namelength] = '\0';
|
|
||||||
}
|
|
||||||
/* 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)
|
||||||
{
|
{
|
||||||
@ -3133,7 +3123,7 @@ add_psymbol_to_bcache (char *name, int namelength, domain_enum domain,
|
|||||||
PSYMBOL_DOMAIN (&psymbol) = domain;
|
PSYMBOL_DOMAIN (&psymbol) = domain;
|
||||||
PSYMBOL_CLASS (&psymbol) = class;
|
PSYMBOL_CLASS (&psymbol) = class;
|
||||||
|
|
||||||
SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile);
|
SYMBOL_SET_NAMES (&psymbol, name, namelength, objfile);
|
||||||
|
|
||||||
/* Stash the partial symbol away in the cache */
|
/* Stash the partial symbol away in the cache */
|
||||||
return bcache_full (&psymbol, sizeof (struct partial_symbol),
|
return bcache_full (&psymbol, sizeof (struct partial_symbol),
|
||||||
|
Reference in New Issue
Block a user