binutils-gdb modified for the FreeChainXenon project
![]() Following 5 patches series is trying to clean up the interface of the DWARF expression evaluator class (dwarf_expr_context). After merging all expression evaluators into one class, the next logical step is to make a clean user interface for that class. To do that, we first need to address the issue of class users writing and reading the internal data of the class directly. Fixing the case of writing is simple, it makes sense for an evaluator instance to be per architecture basis. Currently, the best separation seems to be per object file, so having that data (dwarf2_per_objfile) as a constructor argument makes sense. It also makes sense to get the address size from that object file, but unfortunately that interface does not exist at the moment. Luckily, address size information is already available to the users through other means. As a result, the address size also needs to be a class constructor argument, at least until a better interface for acquiring that information from an object file is implemented. The rest of the user written data comes down to a context of an evaluated expression (compilation unit context, frame context and passed in buffer context) and a source type information that a result of evaluating expression is representing. So, it makes sense for all of these to be arguments of an evaluation method. To address the problem of reading the dwarf_expr_context class internal data, we first need to understand why it is implemented that way? This is actualy a question of which existing class can be used to represent both values and a location descriptions and why it is not used currently? The answer is in a struct value class/structure, but the problem is that before the evaluators were merged, only one evaluator had an infrastructure to resolve composite and implicit pointer location descriptions. After the merge, we are now able to use the struct value to represent any result of the expression evaluation. It also makes sense to move all infrastructure for those location descriptions to the expr.c file considering that that is the only place using that infrastructure. What we are left with in the end is a clean public interface of the dwarf_expr_context class containing: - constructor, - destructor, - push_address method and - eval_exp method. The idea with this particular patch is to move piece_closure structure and the interface that handles it (lval_funcs) to expr.c file. While implicit pointer location descriptions are still not useful in the CFI context (of the AMD's DWARF standard extensions), the composite location descriptions are certainly necessary to describe a results of specific compiler optimizations. Considering that a piece_closure structure is used to represent both, there was no benefit in splitting them. gdb/ChangeLog: * dwarf2/expr.c (struct piece_closure): Add from loc.c. (allocate_piece_closure): Add from loc.c. (bits_to_bytes): Add from loc.c. (rw_pieced_value): Add from loc.c. (read_pieced_value): Add from loc.c. (write_pieced_value): Add from loc.c. (check_pieced_synthetic_pointer): Add from loc.c. (indirect_pieced_value): Add from loc.c. (coerce_pieced_ref): Add from loc.c. (copy_pieced_value_closure): Add from loc.c. (free_pieced_value_closure): Add from loc.c. (sect_variable_value): Add from loc.c. * dwarf2/loc.c (sect_variable_value): Move to expr.c. (struct piece_closure): Move to expr.c. (allocate_piece_closure): Move to expr.c. (bits_to_bytes): Move to expr.c. (rw_pieced_value): Move to expr.c. (read_pieced_value): Move to expr.c. (write_pieced_value): Move to expr.c. (check_pieced_synthetic_pointer): Move to expr.c. (indirect_pieced_value): Move to expr.c. (coerce_pieced_ref): Move to expr.c. (copy_pieced_value_closure): Move to expr.c. (free_pieced_value_closure): Move to expr.c. |
||
---|---|---|
bfd | ||
binutils | ||
config | ||
contrib | ||
cpu | ||
elfcpp | ||
etc | ||
gas | ||
gdb | ||
gdbserver | ||
gdbsupport | ||
gnulib | ||
gold | ||
gprof | ||
include | ||
intl | ||
ld | ||
libctf | ||
libdecnumber | ||
libiberty | ||
opcodes | ||
readline | ||
sim | ||
texinfo | ||
zlib | ||
.cvsignore | ||
.gitattributes | ||
.gitignore | ||
ar-lib | ||
ChangeLog | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
COPYING.LIBGLOSS | ||
COPYING.NEWLIB | ||
COPYING3 | ||
COPYING3.LIB | ||
depcomp | ||
djunpack.bat | ||
install-sh | ||
libtool.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
lt~obsolete.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
makefile.vms | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
README-maintainer-mode | ||
setup.com | ||
src-release.sh | ||
symlink-tree | ||
test-driver | ||
ylwrap |
README for GNU development tools This directory contains various GNU compilers, assemblers, linkers, debuggers, etc., plus their support routines, definitions, and documentation. If you are receiving this as part of a GDB release, see the file gdb/README. If with a binutils release, see binutils/README; if with a libg++ release, see libg++/README, etc. That'll give you info about this package -- supported targets, how to use it, how to report bugs, etc. It is now possible to automatically configure and build a variety of tools with one command. To build all of the tools contained herein, run the ``configure'' script here, e.g.: ./configure make To install them (by default in /usr/local/bin, /usr/local/lib, etc), then do: make install (If the configure script can't determine your type of computer, give it the name as an argument, for instance ``./configure sun4''. You can use the script ``config.sub'' to test whether a name is recognized; if it is, config.sub translates it to a triplet specifying CPU, vendor, and OS.) If you have more than one compiler on your system, it is often best to explicitly set CC in the environment before running configure, and to also set CC when running make. For example (assuming sh/bash/ksh): CC=gcc ./configure make A similar example using csh: setenv CC gcc ./configure make Much of the code and documentation enclosed is copyright by the Free Software Foundation, Inc. See the file COPYING or COPYING.LIB in the various directories, for a description of the GNU General Public License terms under which you can copy the files. REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info on where and how to report problems.