{
// Get the file/line number for this label
int dline;
- const char *file = dwarf_decl_file (&die);
+ const char *file = dwarf_decl_file (&die) ?: "<unknown source>";
dwarf_decl_line (&die, &dline);
vector<Dwarf_Die> scopes = getscopes_die(&die);
{
assert (function);
assert (c);
- *c = dwarf_decl_file (function);
+ *c = dwarf_decl_file (function) ?: "<unknown source>";
}
return decl_line < other.decl_line;
int cmp = name.compare(other.name);
- if (!cmp)
- cmp = strcmp(decl_file, other.decl_file);
+
+ if (!cmp)
+ {
+ assert (decl_file);
+ assert (other.decl_file);
+ cmp = strcmp(decl_file, other.decl_file);
+ }
+
return cmp < 0;
}
if (! q->e.cu_name.empty())
{
- const char *die_name = dwarf_diename(cudie);
-
+ const char *die_name = dwarf_diename(cudie) ?: "";
if (strcmp(die_name, q->e.cu_name.c_str()) != 0 // Perfect match
&& fnmatch(q->cu_name_pattern.c_str(), die_name, 0) != 0)
{
{
// build a tracepoint_arg for this parameter
tracepoint_arg tparg;
- tparg.name = dwarf_diename(&arg);
+ tparg.name = dwarf_diename(&arg) ?: "";
// read the type of this parameter
if (!dwarf_attr_die (&arg, DW_AT_type, &tparg.type_die)