bao icon indicating copy to clipboard operation
bao copied to clipboard

this is the bao half of the Enhancements pr on pdb_wrapper

Open jfm535 opened this issue 3 years ago • 6 comments

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

jfm535 avatar Jul 25 '21 21:07 jfm535


    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 avatar Jul 25 '21 22:07 jfm535

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.

jfm535 avatar Jul 26 '21 18:07 jfm535

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.

not-wlan avatar Jul 31 '21 13:07 not-wlan

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?

jfm535 avatar Aug 01 '21 23:08 jfm535

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.

not-wlan avatar Aug 06 '21 19:08 not-wlan

Oh wait the smart idea would probably be a type visitor

jfmherokiller avatar Aug 07 '21 20:08 jfmherokiller