Skip to content

Commit

Permalink
macho-parser: Run dsymutil before the binary is parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Aug 17, 2023
1 parent 1f7d4fc commit 917508a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/parsers/macho-parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ class MachoParser : public IFileParser

void setupParser(IFilter* filter) final
{
auto& conf = IConfiguration::getInstance();

// Run dsymutil to make sure the DWARF info is avaiable
auto dsymutil_command = fmt("dsymutil %s/%s",
conf.keyAsString("binary-path").c_str(),
conf.keyAsString("binary-name").c_str());
kcov_debug(ELF_MSG, "running %s\n", dsymutil_command.c_str());

system(dsymutil_command.c_str());
}

// Mach-O command handlers
Expand Down

0 comments on commit 917508a

Please sign in to comment.