Skip to content

this is the bao half of the Enhancements pr on pdb_wrapper#5

Draft
jfm535 wants to merge 1 commit into
not-wlan:masterfrom
jfm535:Enhancements2
Draft

this is the bao half of the Enhancements pr on pdb_wrapper#5
jfm535 wants to merge 1 commit into
not-wlan:masterfrom
jfm535:Enhancements2

Conversation

@jfm535

@jfm535 jfm535 commented Jul 25, 2021

Copy link
Copy Markdown
Contributor

same state as before consider this as more cherry pick then pr for now

@jfm535

jfm535 commented Jul 25, 2021

Copy link
Copy Markdown
Contributor Author

    pub fn get_entities(&self, kind: EntityKind) -> Vec<Entity> {
        self.0
            .get_entity()
            .get_children()
            .into_iter()
            .filter(|e| e.get_kind() == kind)
            .filter(|e| !e.is_in_system_header())
            .collect::<Vec<_>>()
    }

im not sure this traverses the whole tree eg I think it only goes to the next level

@jfm535

jfm535 commented Jul 26, 2021

Copy link
Copy Markdown
Contributor Author

in terms of c++ issues I am testing this tool agenst this https://github.com/jfmherokiller/CommonLibSSE/tree/ClangFixes (its a modified version of commonlibsse that is more compatable with clang.

The reason i said it might not traverse the whole tree is because these are the results

21:59:55 [INFO] Please fix these errors before continuing!
21:59:55 [INFO] Parsed 0 function definitions.
21:59:55 [INFO] Parsed 1 struct definitions.
21:59:55 [INFO] Parsed 0 global variable definitions.
21:59:55 [INFO] Parsed 5 class definitions.
21:59:55 [INFO] Parsed 1276 namespace definitions.
21:59:55 [INFO] Parsed 3 method definitions.
21:59:55 [INFO] Parsed 0 field definitions.
21:59:55 [INFO] Parsed 0 constructor definitions.
21:59:55 [INFO] Parsed 0 destructor definitions.
21:59:55 [INFO] Parsed 3 function template definitions.
21:59:55 [INFO] Parsed 0 class template definitions.
21:59:55 [INFO] Parsed 0 class template partial definitions.

@not-wlan

Copy link
Copy Markdown
Owner

im not sure this traverses the whole tree eg I think it only goes to the next level

Yeah that is accurate. I didn't write this with namespaces in mind so that is probably going to cause the brunt of the issues. We'll have recursively traverse any namespaces we encounter. Same goes for classes.

@jfm535

jfm535 commented Aug 1, 2021

Copy link
Copy Markdown
Contributor Author

im not sure this traverses the whole tree eg I think it only goes to the next level

Yeah that is accurate. I didn't write this with namespaces in mind so that is probably going to cause the brunt of the issues. We'll have recursively traverse any namespaces we encounter. Same goes for classes.

could it be do it iteratively by checking if Getchild is null?
and continuing through the list until for every entry stored in list has no children?

@not-wlan

not-wlan commented Aug 6, 2021

Copy link
Copy Markdown
Owner

could it be do it iteratively by checking if Getchild is null?
and continuing through the list until for every entry stored in list has no children?
I don't think the issue is how to actually get the entities but rather how to encode them as a PDB. I'm not entirely sure how namespaces or classes work in PDBs.

@jfmherokiller

Copy link
Copy Markdown
Contributor

Oh wait the smart idea would probably be a type visitor

Repository owner deleted a comment from jfmherokiller Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants