File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,8 @@ bool extract_symbols(const std::string& filepath, std::vector<SymbolEntry>& symb
283283 }
284284 }
285285 free (demangled);
286- symbols.push_back (SymbolEntry{ symName, sym.n_value - preferred_load_address });
286+ if (!symName.empty ())
287+ symbols.push_back (SymbolEntry{ symName, sym.n_value - preferred_load_address });
287288 }
288289 }
289290
@@ -347,13 +348,15 @@ void scan_dir_recursive(const std::string& basePath, const std::string& currentR
347348 return a.address < b.address ;
348349 });
349350
350- FileEntry fe;
351- fe.name = name;
352- // Remove "Symbols" prefix (assumes currentRelPath starts with "Symbols")
353- fe.path = newRelPath.substr (7 );
354- fe.symbols = std::move (symbols);
351+ if (!symbols.empty ()) {
352+ FileEntry fe;
353+ fe.name = name;
354+ // Remove "Symbols" prefix (assumes currentRelPath starts with "Symbols")
355+ fe.path = newRelPath.substr (7 );
356+ fe.symbols = std::move (symbols);
355357
356- entries.push_back (std::move (fe));
358+ entries.push_back (std::move (fe));
359+ }
357360 }
358361 }
359362 closedir (dir);
You can’t perform that action at this time.
0 commit comments