Skip to content

Consider adding a higher level API on top of DIE parsing/traversal #82

Open
@fitzgen

Description

@fitzgen

Something like this:

struct Subprogram {
    ...
}

impl Subprogram {
    pub fn new(die: DebuggingInformationEntry) -> Subprogram {
        assert!(die.tag() == DW_TAG_subprogram);
        Subprogram { ... }
    }

    pub fn name(&self) -> Option<&ffi::CStr> { ... }

    pub fn linkage_name(&self) -> Option<&ffi::CStr> { ... }

    pub fn calling_convention(&self) -> Option<DwCc> { ... }

    pub fn is_pure(&self) -> Option<bool> { ... }

    pub fn is_recursive(&self) -> Option<bool> { ... }

    // Etc...
}

Would ideally be able to become owned, if the user wants to copy the data.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions