GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "varobj.h"
#include "c-lang.h"
#include "objc-lang.h"
#include "complaints.h"
#include "value.h"
#include "symfile.h"
#include "objfiles.h"
#include "target.h"
#include "gdbcore.h"
#include "gdbcmd.h"
#include "frame.h"
#include "gdbsupport/gdb_regex.h"
#include "regcache.h"
#include "block.h"
#include "infcall.h"
#include "valprint.h"
#include "cli/cli-utils.h"
#include "c-exp.h"
#include <ctype.h>
#include <algorithm>
Go to the source code of this file.
Classes | |
struct | objc_object |
struct | objc_class |
struct | objc_super |
struct | objc_method |
class | objc_language |
struct | selname |
struct | objc_methcall |
Macros | |
#define | nmethcalls (sizeof (methcalls) / sizeof (methcalls[0])) |
Functions | |
struct symbol * | lookup_struct_typedef (const char *name, const struct block *block, int noerr) |
CORE_ADDR | lookup_objc_class (struct gdbarch *gdbarch, const char *classname) |
CORE_ADDR | lookup_child_selector (struct gdbarch *gdbarch, const char *selname) |
struct value * | value_nsstring (struct gdbarch *gdbarch, const char *ptr, int len) |
void | start_msglist (void) |
void | add_msglist (struct stoken *str, int addcolon) |
int | end_msglist (struct parser_state *ps) |
static int | specialcmp (const char *a, const char *b) |
static int | compare_selectors (const void *a, const void *b) |
static void | info_selectors_command (const char *regexp, int from_tty) |
static int | compare_classes (const void *a, const void *b) |
static void | info_classes_command (const char *regexp, int from_tty) |
static char * | parse_selector (char *method, char **selector) |
static char * | parse_method (char *method, char *type, char **theclass, char **category, char **selector) |
static void | find_methods (char type, const char *theclass, const char *category, const char *selector, std::vector< const char * > *symbol_names) |
static void | uniquify_strings (std::vector< const char * > *strings) |
const char * | find_imps (const char *method, std::vector< const char * > *symbol_names) |
static void | print_object_command (const char *args, int from_tty) |
static int | resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc) |
static int | resolve_msgsend_stret (CORE_ADDR pc, CORE_ADDR *new_pc) |
static int | resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc) |
static int | resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc) |
static void | find_objc_msgsend (void) |
static int | find_objc_msgcall_submethod (int(*f)(CORE_ADDR, CORE_ADDR *), CORE_ADDR pc, CORE_ADDR *new_pc) |
int | find_objc_msgcall (CORE_ADDR pc, CORE_ADDR *new_pc) |
void | _initialize_objc_language () |
static void | read_objc_method (struct gdbarch *gdbarch, CORE_ADDR addr, struct objc_method *method) |
static unsigned long | read_objc_methlist_nmethods (struct gdbarch *gdbarch, CORE_ADDR addr) |
static void | read_objc_methlist_method (struct gdbarch *gdbarch, CORE_ADDR addr, unsigned long num, struct objc_method *method) |
static void | read_objc_object (struct gdbarch *gdbarch, CORE_ADDR addr, struct objc_object *object) |
static void | read_objc_super (struct gdbarch *gdbarch, CORE_ADDR addr, struct objc_super *super) |
static void | read_objc_class (struct gdbarch *gdbarch, CORE_ADDR addr, struct objc_class *theclass) |
static CORE_ADDR | find_implementation_from_class (struct gdbarch *gdbarch, CORE_ADDR theclass, CORE_ADDR sel) |
static CORE_ADDR | find_implementation (struct gdbarch *gdbarch, CORE_ADDR object, CORE_ADDR sel) |
Variables | |
static const registry< objfile >::key< unsigned int > | objc_objfile_data |
static objc_language | objc_language_defn |
static int | msglist_len |
static struct selname * | selname_chain |
static char * | msglist_sel |
static struct objc_methcall | methcalls [] |
Definition at line 1226 of file objc-lang.c.
Referenced by find_objc_msgcall(), and find_objc_msgsend().
void _initialize_objc_language | ( | ) |
Definition at line 1323 of file objc-lang.c.
Referenced by initialize_all_files().
void add_msglist | ( | struct stoken * | str, |
int | addcolon ) |
Definition at line 429 of file objc-lang.c.
References stoken::length, msglist_len, msglist_sel, stoken::ptr, xfree(), and xmalloc().
Referenced by yyparse().
|
static |
Definition at line 693 of file objc-lang.c.
References specialcmp().
Referenced by info_classes_command().
|
static |
Definition at line 524 of file objc-lang.c.
References specialcmp().
Referenced by info_selectors_command().
int end_msglist | ( | struct parser_state * | ps | ) |
Definition at line 467 of file objc-lang.c.
References expr_builder::gdbarch(), lookup_child_selector(), selname::msglist_len, msglist_len, selname::msglist_sel, msglist_sel, selname::next, parser_state::pop(), parser_state::pop_vector(), parser_state::push_new(), selname_chain, and xfree().
Referenced by yyparse().
|
static |
Definition at line 1449 of file objc-lang.c.
References find_implementation_from_class(), objc_object::isa, and read_objc_object().
Referenced by resolve_msgsend(), and resolve_msgsend_stret().
|
static |
Definition at line 1401 of file objc-lang.c.
References gdbarch_byte_order(), objc_method::imp, objc_class::methods, objc_method::name, read_memory_unsigned_integer(), read_objc_class(), read_objc_methlist_method(), read_objc_methlist_nmethods(), and objc_class::super_class.
Referenced by find_implementation(), resolve_msgsend_super(), and resolve_msgsend_super_stret().
const char * find_imps | ( | const char * | method, |
std::vector< const char * > * | symbol_names ) |
Definition at line 1097 of file objc-lang.c.
References find_methods(), lookup_minimal_symbol(), lookup_symbol(), bound_minimal_symbol::minsym, general_symbol_info::natural_name(), parse_method(), parse_selector(), selector, block_symbol::symbol, uniquify_strings(), and VAR_DOMAIN.
Referenced by decode_objc(), and find_function_symbols().
|
static |
Definition at line 967 of file objc-lang.c.
References current_program_space, registry< T >::get(), objfile::msymbols(), objc_objfile_data, program_space::objfiles(), parse_method(), QUIT, selector, and xrealloc().
Referenced by find_imps().
int find_objc_msgcall | ( | CORE_ADDR | pc, |
CORE_ADDR * | new_pc ) |
Definition at line 1298 of file objc-lang.c.
References find_objc_msgcall_submethod(), find_objc_msgsend(), methcalls, and nmethcalls.
Referenced by objc_language::skip_trampoline().
|
static |
Definition at line 1278 of file objc-lang.c.
References exception_fprintf(), f(), and gdb_stderr.
Referenced by find_objc_msgcall().
|
static |
Definition at line 1236 of file objc-lang.c.
References objc_methcall::begin, objc_methcall::end, func, lookup_bound_minimal_symbol(), methcalls, minimal_symbol_upper_bound(), name, objc_methcall::name, and nmethcalls.
Referenced by find_objc_msgcall().
|
static |
Definition at line 716 of file objc-lang.c.
References symbol::aclass(), begin_line(), compare_classes(), current_program_space, gdb_printf(), symbol::matches(), objfile::msymbols(), name, program_space::objfiles(), puts_tabular(), qsort, QUIT, re_comp(), and specialcmp().
|
static |
Definition at line 551 of file objc-lang.c.
References begin_line(), compare_selectors(), complaint, current_program_space, gdb_printf(), symbol::matches(), objfile::msymbols(), name, program_space::objfiles(), puts_tabular(), qsort, QUIT, re_comp(), and specialcmp().
CORE_ADDR lookup_child_selector | ( | struct gdbarch * | gdbarch, |
const char * | selname ) |
Definition at line 140 of file objc-lang.c.
References builtin_type::builtin_char, builtin_type(), call_function_by_hand(), complaint, find_function_in_inferior(), lookup_minimal_symbol(), target_has_execution(), value_as_long(), value_coerce_array(), and value_string().
Referenced by end_msglist(), eval_op_objc_msgcall(), eval_op_objc_selector(), and value_nsstring().
CORE_ADDR lookup_objc_class | ( | struct gdbarch * | gdbarch, |
const char * | classname ) |
Definition at line 111 of file objc-lang.c.
References builtin_type::builtin_char, builtin_type(), call_function_by_hand(), complaint, find_function_in_inferior(), lookup_minimal_symbol(), target_has_execution(), value_as_long(), value_coerce_array(), and value_string().
Referenced by classify_name(), value_nsstring(), and yyparse().
Definition at line 86 of file objc-lang.c.
References type::code(), lookup_symbol(), name, STRUCT_DOMAIN, block_symbol::symbol, and symbol::type().
Referenced by classify_name(), and value_nsstring().
|
static |
Definition at line 871 of file objc-lang.c.
References s1, s2, and selector.
Referenced by find_imps(), and find_methods().
|
static |
Definition at line 819 of file objc-lang.c.
References s1, s2, and selector.
Referenced by find_imps().
|
static |
Definition at line 1153 of file objc-lang.c.
References builtin_type::builtin_data_ptr, call_function_by_hand(), find_function_in_inferior(), gdb_printf(), parse_expression(), QUIT, read_memory(), and value_as_long().
|
static |
Definition at line 1382 of file objc-lang.c.
References objc_class::cache, gdbarch_byte_order(), objc_class::info, objc_class::instance_size, objc_class::isa, objc_class::ivars, objc_class::methods, objc_class::name, objc_class::protocols, read_memory_unsigned_integer(), objc_class::super_class, and objc_class::version.
Referenced by find_implementation_from_class().
|
static |
Definition at line 1355 of file objc-lang.c.
References read_objc_methlist_nmethods(), and read_objc_method().
Referenced by find_implementation_from_class().
|
static |
Definition at line 1347 of file objc-lang.c.
References gdbarch_byte_order(), and read_memory_unsigned_integer().
Referenced by find_implementation_from_class(), and read_objc_methlist_method().
|
static |
Definition at line 1336 of file objc-lang.c.
References gdbarch_byte_order(), objc_method::imp, objc_method::name, read_memory_unsigned_integer(), and objc_method::types.
Referenced by read_objc_methlist_method().
|
static |
Definition at line 1363 of file objc-lang.c.
References gdbarch_byte_order(), and read_memory_unsigned_integer().
Referenced by find_implementation().
|
static |
Definition at line 1372 of file objc-lang.c.
References gdbarch_byte_order(), read_memory_unsigned_integer(), objc_super::receiver, and objc_super::theclass.
Referenced by resolve_msgsend_super(), and resolve_msgsend_super_stret().
|
static |
Definition at line 1464 of file objc-lang.c.
References builtin_type::builtin_func_ptr, builtin_type(), find_implementation(), gdbarch_fetch_pointer_argument(), get_current_frame(), and get_frame_arch().
|
static |
Definition at line 1486 of file objc-lang.c.
References builtin_type::builtin_func_ptr, builtin_type(), find_implementation(), gdbarch_fetch_pointer_argument(), get_current_frame(), and get_frame_arch().
|
static |
Definition at line 1508 of file objc-lang.c.
References builtin_type::builtin_func_ptr, builtin_type(), find_implementation_from_class(), gdbarch_fetch_pointer_argument(), get_current_frame(), get_frame_arch(), read_objc_super(), and objc_super::theclass.
|
static |
Definition at line 1536 of file objc-lang.c.
References builtin_type::builtin_func_ptr, builtin_type(), find_implementation_from_class(), gdbarch_fetch_pointer_argument(), get_current_frame(), get_frame_arch(), read_objc_super(), and objc_super::theclass.
|
static |
Definition at line 501 of file objc-lang.c.
Referenced by compare_classes(), compare_selectors(), info_classes_command(), and info_selectors_command().
void start_msglist | ( | void | ) |
Definition at line 415 of file objc-lang.c.
References selname::msglist_len, msglist_len, selname::msglist_sel, msglist_sel, selname::next, selname_chain, and xmalloc().
Referenced by yyparse().
|
static |
Definition at line 1056 of file objc-lang.c.
Referenced by find_imps().
Definition at line 168 of file objc-lang.c.
References builtin_type::builtin_char, builtin_type::builtin_data_ptr, builtin_type::builtin_long, builtin_type(), call_function_by_hand(), value::deprecated_set_type(), find_function_in_inferior(), lookup_child_selector(), lookup_minimal_symbol(), lookup_objc_class(), lookup_pointer_type(), lookup_struct_typedef(), target_has_execution(), type, symbol::type(), value_coerce_array(), value_from_longest(), and value_string().
Referenced by expr::objc_nsstring_operation::evaluate().
|
static |
Definition at line 1217 of file objc-lang.c.
Referenced by find_objc_msgcall(), and find_objc_msgsend().
|
static |
Definition at line 410 of file objc-lang.c.
Referenced by add_msglist(), end_msglist(), and start_msglist().
|
static |
Definition at line 412 of file objc-lang.c.
Referenced by add_msglist(), end_msglist(), and start_msglist().
|
static |
Definition at line 396 of file objc-lang.c.
Definition at line 79 of file objc-lang.c.
Referenced by find_methods().
|
static |
Definition at line 411 of file objc-lang.c.
Referenced by end_msglist(), and start_msglist().