<< "duplicate abbrev code " << abbr_code
<< "; already defined at " << original->where << '.' << std::endl;
- struct abbrev fake;
- struct abbrev *cur;
+ abbrev fake;
+ abbrev *cur;
/* Don't actually save this abbrev if it's duplicate. */
if (likely (original == NULL))
{
REALLOC (section, abbr);
cur = section->abbr + section->size++;
+ new (cur) abbrev ();
}
else
cur = &fake;
- WIPE (*cur);
- new (&cur->where) class where ();
cur->code = abbr_code;
cur->where = where;
REALLOC (cur, attribs);
struct abbrev_attrib *acur = cur->attribs + cur->size++;
- WIPE (*acur);
- new (&acur->where) class where ();
+ new (acur) abbrev_attrib ();
acur->name = attrib_name;
acur->form = attrib_form;
acur->where = where;
/* Low-level checking of .debug_abbrev.
- Copyright (C) 2009, 2010 Red Hat, Inc.
+ Copyright (C) 2009, 2010, 2011 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
struct abbrev_attrib
{
- struct where where;
+ ::where where;
uint16_t name;
uint8_t form;
+
+ abbrev_attrib ()
+ : where ()
+ , name (0)
+ , form (0)
+ {}
};
struct abbrev
{
+ ::where where;
uint64_t code;
- struct where where;
/* Attributes. */
- struct abbrev_attrib *attribs;
+ abbrev_attrib *attribs;
size_t size;
size_t alloc;
/* Whether some DIE uses this abbrev. */
bool used;
+
+ abbrev ()
+ : where ()
+ , code (0)
+ , attribs (0)
+ , size (0)
+ , alloc (0)
+ , tag (0)
+ , has_children (false)
+ , used (false)
+ {}
};
struct abbrev_table