projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Guard against 'current_directory == NULL' on gdb_abspath (PR gdb/23613)
[deliverable/binutils-gdb.git]
/
binutils
/
wrstabs.c
diff --git
a/binutils/wrstabs.c
b/binutils/wrstabs.c
index 0ca861ce8d84b4b9dbdc0d9a1c11c72bbf673b90..3e941dcefd5816fa3a54ce9fe4fb8544b06d0a6a 100644
(file)
--- a/
binutils/wrstabs.c
+++ b/
binutils/wrstabs.c
@@
-1,6
+1,5
@@
/* wrstabs.c -- Output stabs debugging information
/* wrstabs.c -- Output stabs debugging information
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
- 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@
-1312,9
+1311,7
@@
stab_start_struct_type (void *p, const char *tag, unsigned int id,
struct stab_write_handle *info = (struct stab_write_handle *) p;
long tindex;
bfd_boolean definition;
struct stab_write_handle *info = (struct stab_write_handle *) p;
long tindex;
bfd_boolean definition;
- char *buf;
-
- buf = (char *) xmalloc (40);
+ char buf[40];
if (id == 0)
{
if (id == 0)
{
@@
-1443,18
+1440,15
@@
stab_end_struct_type (void *p)
/* Start outputting a class. */
static bfd_boolean
/* Start outputting a class. */
static bfd_boolean
-stab_start_class_type (void *p, const char *tag, unsigned int id, bfd_boolean structp, unsigned int size, bfd_boolean vptr, bfd_boolean ownvptr)
+stab_start_class_type (void *p, const char *tag, unsigned int id,
+ bfd_boolean structp, unsigned int size,
+ bfd_boolean vptr, bfd_boolean ownvptr)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- bfd_boolean definition;
- char *vstring;
+ bfd_boolean definition
= FALSE
;
+ char *vstring
= NULL
;
- if (! vptr || ownvptr)
- {
- definition = FALSE;
- vstring = NULL;
- }
- else
+ if (vptr && !ownvptr)
{
definition = info->type_stack->definition;
vstring = stab_pop_type (info);
{
definition = info->type_stack->definition;
vstring = stab_pop_type (info);
@@
-1475,17
+1469,16
@@
stab_start_class_type (void *p, const char *tag, unsigned int id, bfd_boolean st
}
else
{
}
else
{
+ assert (vstring);
vtable = (char *) xmalloc (strlen (vstring) + 3);
sprintf (vtable, "~%%%s", vstring);
free (vstring);
vtable = (char *) xmalloc (strlen (vstring) + 3);
sprintf (vtable, "~%%%s", vstring);
free (vstring);
+ if (definition)
+ info->type_stack->definition = TRUE;
}
}
-
info->type_stack->vtable = vtable;
}
info->type_stack->vtable = vtable;
}
- if (definition)
- info->type_stack->definition = TRUE;
-
return TRUE;
}
return TRUE;
}
This page took
0.03331 seconds
and
4
git commands to generate.