Skip to content

Commit

Permalink
formatting support for subprocedure return types
Browse files Browse the repository at this point in the history
  • Loading branch information
zolutal committed Jan 3, 2024
1 parent c41d00e commit ff5a11d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,13 @@ pub fn format_type(dwarf: &Dwarf, member_name: String, typ: MemberType,
// pointers to subroutines must be handled differently
if let Ok(MemberType::Subroutine(subp)) = inner {

// FIXME: get the actual return type
let return_type = "void";
let return_type = match subp.get_type(dwarf) {
Ok(rtype) => format_type(dwarf, "".to_string(), rtype,
level+1, tablevel, verbosity,
base_offset)?,
Err(Error::TypeAttributeNotFound) => "void".to_string(),
Err(e) => return Err(e)
};

let argstr = {
format_type(dwarf, "".to_string(),
Expand Down

0 comments on commit ff5a11d

Please sign in to comment.