The previous implementation of summarized dumps within region_model::dump_to_pp showed only the "top-level" keys within the current frame and for globals, and thus didn't e.g. show the values of fields of structs, or elements of arrays. This patch rewrites it to gather a vec of representative path_vars for all regions, using this to generate the dump, so that all expressible lvalues ought to make it to the summarized dump. gcc/analyzer/ChangeLog: * region-model.cc: Include "stor-layout.h". (region_model::dump_to_pp): Rather than calling dump_summary_of_map on each of the current frame and the globals, instead get a vec of representative path_vars for all regions, and then dump a summary of all of them. (region_model::dump_summary_of_map): Delete, rewriting into... (region_model::dump_summary_of_rep_path_vars): ...this new function, working on a vec of path_vars. (region_model::set_value): New overload. (region_model::get_representative_path_var): Rename "parent_region" local to "parent_reg" and consolidate with other local. Guard test for grandparent being stack on parent_reg being non-NULL. Move handling for parent being an array_region to within guard for parent_reg being non-NULL. (selftest::make_test_compound_type): New function. (selftest::test_dump_2): New selftest. (selftest::test_dump_3): New selftest. (selftest::test_stack_frames): Update expected output from simplified dump to show "a" and "b" from parent frame and "y" in child frame. (selftest::analyzer_region_model_cc_tests): Call test_dump_2 and test_dump_3. * region-model.h (region_model::set_value): New overload decl. (region_model::dump_summary_of_map): Delete. (region_model::dump_summary_of_rep_path_vars): New.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| ChangeLog | Loading commit data... | |
| analysis-plan.cc | Loading commit data... | |
| analysis-plan.h | Loading commit data... | |
| analyzer-logging.cc | Loading commit data... | |
| analyzer-logging.h | Loading commit data... | |
| analyzer-pass.cc | Loading commit data... | |
| analyzer-selftests.cc | Loading commit data... | |
| analyzer-selftests.h | Loading commit data... | |
| analyzer.cc | Loading commit data... | |
| analyzer.h | Loading commit data... | |
| analyzer.opt | Loading commit data... | |
| bar-chart.cc | Loading commit data... | |
| bar-chart.h | Loading commit data... | |
| call-string.cc | Loading commit data... | |
| call-string.h | Loading commit data... | |
| checker-path.cc | Loading commit data... | |
| checker-path.h | Loading commit data... | |
| constraint-manager.cc | Loading commit data... | |
| constraint-manager.h | Loading commit data... | |
| diagnostic-manager.cc | Loading commit data... | |
| diagnostic-manager.h | Loading commit data... | |
| engine.cc | Loading commit data... | |
| engine.h | Loading commit data... | |
| exploded-graph.h | Loading commit data... | |
| function-set.cc | Loading commit data... | |
| function-set.h | Loading commit data... | |
| pending-diagnostic.cc | Loading commit data... | |
| pending-diagnostic.h | Loading commit data... | |
| program-point.cc | Loading commit data... | |
| program-point.h | Loading commit data... | |
| program-state.cc | Loading commit data... | |
| program-state.h | Loading commit data... | |
| reachability.h | Loading commit data... | |
| region-model.cc | Loading commit data... | |
| region-model.h | Loading commit data... | |
| sm-file.cc | Loading commit data... | |
| sm-malloc.cc | Loading commit data... | |
| sm-malloc.dot | Loading commit data... | |
| sm-pattern-test.cc | Loading commit data... | |
| sm-sensitive.cc | Loading commit data... | |
| sm-signal.cc | Loading commit data... | |
| sm-taint.cc | Loading commit data... | |
| sm.cc | Loading commit data... | |
| sm.h | Loading commit data... | |
| state-purge.cc | Loading commit data... | |
| state-purge.h | Loading commit data... | |
| supergraph.cc | Loading commit data... | |
| supergraph.h | Loading commit data... |