aboutsummaryrefslogtreecommitdiff
path: root/test-driver
diff options
context:
space:
mode:
authorZoran Zaric <zoran.zaric@amd.com>2020-09-14 17:02:29 +0100
committerZoran Zaric <zoran.zaric@amd.com>2021-08-05 16:39:36 +0100
commita580d9604bb71c19741465f2e3a46c5a07672be0 (patch)
tree90f1099bf62a413710f2e0f464fe96ece9da0666 /test-driver
parent6c7779b34b38ca71df9460c07bc4c03d01dfaa0b (diff)
downloadgdb-a580d9604bb71c19741465f2e3a46c5a07672be0.zip
gdb-a580d9604bb71c19741465f2e3a46c5a07672be0.tar.gz
gdb-a580d9604bb71c19741465f2e3a46c5a07672be0.tar.bz2
Move compilation unit info to dwarf_expr_context
This patch moves the compilation unit context information and support from dwarf_expr_executor and dwarf_evaluate_loc_desc to dwarf_expr_context evaluator. The idea is to report an error when a given operation requires a compilation unit information to be resolved, which is not available. With this change, it also makes sense to always acquire ref_addr_size information from the compilation unit context, considering that all DWARF operations that refer to that information require a compilation unit context to be present during their evaluation. gdb/ChangeLog: * dwarf2/expr.c (ensure_have_per_cu): New function. (dwarf_expr_context::dwarf_expr_context): Add compilation unit context information. (dwarf_expr_context::get_base_type): Move from dwarf_evaluate_loc_desc. (dwarf_expr_context::get_addr_index): Remove method. (dwarf_expr_context::dwarf_variable_value): Remove method. (dwarf_expr_context::execute_stack_op): Call compilation unit context info check. Inline get_addr_index and dwarf_variable_value methods. * dwarf2/expr.h (struct dwarf_expr_context): Add compilation context info. (dwarf_expr_context::get_addr_index): Remove method. (dwarf_expr_context::dwarf_variable_value): Remove method. (dwarf_expr_context::ref_addr_size): Remove member. * dwarf2/frame.c (dwarf_expr_executor::get_addr_index): Remove method. (dwarf_expr_executor::dwarf_variable_value): Remove method. * dwarf2/loc.c (sect_variable_value): Expose function. (dwarf_evaluate_loc_desc::get_addr_index): Remove method. (dwarf_evaluate_loc_desc::dwarf_variable_value): Remove method. (class dwarf_evaluate_loc_desc): Move compilation unit context information to dwarf_expr_context class. * dwarf2/loc.h (sect_variable_value): Expose function.
Diffstat (limited to 'test-driver')
0 files changed, 0 insertions, 0 deletions