Skip to content

Commit

Permalink
mdmp: Added custom binary info (#129)
Browse files Browse the repository at this point in the history
Added useful variables from the MDMP header into the binary infos
section.
  • Loading branch information
alexkornitzer authored and radare committed Aug 2, 2017
1 parent 38354a8 commit e1e415d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libr/bin/p/bin_mdmp.c
Expand Up @@ -81,12 +81,16 @@ static RBinInfo *info(RBinFile *arch) {
ret->claimed_checksum = strdup (sdb_fmt (0, "0x%08x", obj->hdr->check_sum));
ret->file = arch->file ? strdup (arch->file) : NULL;
ret->has_va = true;
ret->rclass = strdup ("mdmp");
ret->rpath = strdup ("NONE");
ret->type = strdup ("MDMP (MiniDump crash report data)");

// FIXME: Needed to fix issue with PLT resolving. Can we get away with setting this for all children bins?
ret->has_lit = true;

sdb_set (arch->sdb, "mdmp.flags", sdb_fmt (0, "0x%08x", obj->hdr->flags), 0);
sdb_num_set (arch->sdb, "mdmp.streams", obj->hdr->number_of_streams, 0);

if (obj->streams.system_info)
{
switch (obj->streams.system_info->processor_architecture) {
Expand Down

0 comments on commit e1e415d

Please sign in to comment.