diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-05-16 14:20:45 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-05-16 14:43:42 +0200 |
commit | 83d3415ef530c41af7e1ae98a7add97adb0cf5e0 (patch) | |
tree | fc15cecb5125e57c9f3a510af94f343b0c10f6d5 /gdb/compile/compile-object-load.h | |
parent | 3a9558c494e9b461f752ce26382701d4446f0958 (diff) | |
download | gdb-83d3415ef530c41af7e1ae98a7add97adb0cf5e0.zip gdb-83d3415ef530c41af7e1ae98a7add97adb0cf5e0.tar.gz gdb-83d3415ef530c41af7e1ae98a7add97adb0cf5e0.tar.bz2 |
Code cleanup: compile: func_addr -> func_sym
Currently the code fetches _gdb_expr address/types at multiple places, guessing
its parameters at multiple places etc.
Fetch it once, verify it has expected type and then rely on it.
While the patch tries to clean up the code it is still horrible due to the
missing C++ sub-classing.
gdb/ChangeLog
2015-05-16 Jan Kratochvil <jan.kratochvil@redhat.com>
* compile/compile-object-load.c (get_regs_type): Add parameter func_sym.
Rely on its parameter count.
(compile_object_load): Replace lookup_minimal_symbol_text by
lookup_global_symbol_from_objfile. Verify FUNC_SYM. Set it in the
return value.
* compile/compile-object-load.h (struct compile_module): Replace
func_addr by func_sym.
* compile/compile-object-run.c: Include block.h.
(compile_object_run): Reset module variable after it is freed. Use
FUNC_SYM instead of FUNC_ADDR. Rely on it.
Diffstat (limited to 'gdb/compile/compile-object-load.h')
-rw-r--r-- | gdb/compile/compile-object-load.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/compile/compile-object-load.h b/gdb/compile/compile-object-load.h index 311fb09..f5e887d 100644 --- a/gdb/compile/compile-object-load.h +++ b/gdb/compile/compile-object-load.h @@ -25,8 +25,8 @@ struct compile_module /* .c file OBJFILE was built from. It needs to be xfree-d. */ char *source_file; - /* Inferior function address. */ - CORE_ADDR func_addr; + /* Inferior function GCC_FE_WRAPPER_FUNCTION. */ + struct symbol *func_sym; /* Inferior registers address or NULL if the inferior function does not require any. */ |