aboutsummaryrefslogtreecommitdiff
path: root/gdb/parse.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-04-28 06:49:16 -0600
committerTom Tromey <tromey@adacore.com>2023-04-28 11:16:59 -0600
commit005b65e801c48344d82753c93db5436b310bfde4 (patch)
tree895a65421080ee3b6d11cd49dda06da51bc99958 /gdb/parse.c
parenta38b832238eecf6611a338b39bb8f03f2968c26d (diff)
downloadgdb-005b65e801c48344d82753c93db5436b310bfde4.zip
gdb-005b65e801c48344d82753c93db5436b310bfde4.tar.gz
gdb-005b65e801c48344d82753c93db5436b310bfde4.tar.bz2
Move find_minimal_symbol_address to minsyms.c
I found find_minimal_symbol_address in parse.c, but it seems to me that it belongs in minsyms.c. Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/parse.c')
-rw-r--r--gdb/parse.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/gdb/parse.c b/gdb/parse.c
index 85a6caf..a84b4b6 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -92,86 +92,6 @@ innermost_block_tracker::update (const struct block *b,
-/* Return the type of MSYMBOL, a minimal symbol of OBJFILE. If
- ADDRESS_P is not NULL, set it to the MSYMBOL's resolved
- address. */
-
-type *
-find_minsym_type_and_address (minimal_symbol *msymbol,
- struct objfile *objfile,
- CORE_ADDR *address_p)
-{
- bound_minimal_symbol bound_msym = {msymbol, objfile};
- struct obj_section *section = msymbol->obj_section (objfile);
- enum minimal_symbol_type type = msymbol->type ();
-
- bool is_tls = (section != NULL
- && section->the_bfd_section->flags & SEC_THREAD_LOCAL);
-
- /* The minimal symbol might point to a function descriptor;
- resolve it to the actual code address instead. */
- CORE_ADDR addr;
- if (is_tls)
- {
- /* Addresses of TLS symbols are really offsets into a
- per-objfile/per-thread storage block. */
- addr = CORE_ADDR (bound_msym.minsym->unrelocated_address ());
- }
- else if (msymbol_is_function (objfile, msymbol, &addr))
- {
- if (addr != bound_msym.value_address ())
- {
- /* This means we resolved a function descriptor, and we now
- have an address for a code/text symbol instead of a data
- symbol. */
- if (msymbol->type () == mst_data_gnu_ifunc)
- type = mst_text_gnu_ifunc;
- else
- type = mst_text;
- section = NULL;
- }
- }
- else
- addr = bound_msym.value_address ();
-
- if (overlay_debugging)
- addr = symbol_overlayed_address (addr, section);
-
- if (is_tls)
- {
- /* Skip translation if caller does not need the address. */
- if (address_p != NULL)
- *address_p = target_translate_tls_address (objfile, addr);
- return builtin_type (objfile)->nodebug_tls_symbol;
- }
-
- if (address_p != NULL)
- *address_p = addr;
-
- switch (type)
- {
- case mst_text:
- case mst_file_text:
- case mst_solib_trampoline:
- return builtin_type (objfile)->nodebug_text_symbol;
-
- case mst_text_gnu_ifunc:
- return builtin_type (objfile)->nodebug_text_gnu_ifunc_symbol;
-
- case mst_data:
- case mst_file_data:
- case mst_bss:
- case mst_file_bss:
- return builtin_type (objfile)->nodebug_data_symbol;
-
- case mst_slot_got_plt:
- return builtin_type (objfile)->nodebug_got_plt_symbol;
-
- default:
- return builtin_type (objfile)->nodebug_unknown_symbol;
- }
-}
-
bool
expr_complete_tag::complete (struct expression *exp,
completion_tracker &tracker)