mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
00431a78b2
This is more preparation bits for multi-target support. In a multi-target scenario, we need to address the case of different processes/threads running on different targets that happen to have the same PID/PTID. E.g., we can have both process 123 in target 1, and process 123 in target 2, while they're in reality different processes running on different machines. Or maybe we've loaded multiple instances of the same core file. Etc. To address this, in my WIP multi-target branch, threads and processes are uniquely identified by the (process_stratum target_ops *, ptid_t) and (process_stratum target_ops *, pid) tuples respectively. I.e., each process_stratum instance has its own thread/process number space. As you can imagine, that requires passing around target_ops * pointers in a number of functions where we're currently passing only a ptid_t or an int. E.g., when we look up a thread_info object by ptid_t in find_thread_ptid, the ptid_t alone isn't sufficient. In many cases though, we already have the thread_info or inferior pointer handy, but we "lose" it somewhere along the call stack, only to look it up again by ptid_t/pid. Since thread_info or inferior objects know their parent target, if we pass around thread_info or inferior pointers when possible, we avoid having to add extra target_ops parameters to many functions, and also, we eliminate a number of by ptid_t/int lookups. So that's what this patch does. In a bit more detail: - Changes a number of functions and methods to take a thread_info or inferior pointer instead of a ptid_t or int parameter. - Changes a number of structure fields from ptid_t/int to inferior or thread_info pointers. - Uses the inferior_thread() function whenever possible instead of inferior_ptid. - Uses thread_info pointers directly when possible instead of the is_running/is_stopped etc. routines that require a lookup. - A number of functions are eliminated along the way, such as: int valid_gdb_inferior_id (int num); int pid_to_gdb_inferior_id (int pid); int gdb_inferior_id_to_pid (int num); int in_inferior_list (int pid); - A few structures and places hold a thread_info pointer across inferior execution, so now they take a strong reference to the (refcounted) thread_info object to avoid the thread_info pointer getting stale. This is done in enable_thread_stack_temporaries and in the infcall.c code. - Related, there's a spot in infcall.c where using a RAII object to handle the refcount would be handy, so a gdb::ref_ptr specialization for thread_info is added (thread_info_ref, in gdbthread.h), along with a gdb_ref_ptr policy that works for all refcounted_object types (in common/refcounted-object.h). gdb/ChangeLog: 2018-06-21 Pedro Alves <palves@redhat.com> * ada-lang.h (ada_get_task_number): Take a thread_info pointer instead of a ptid_t. All callers adjusted. * ada-tasks.c (ada_get_task_number): Likewise. All callers adjusted. (print_ada_task_info, display_current_task_id, task_command_1): Adjust. * breakpoint.c (watchpoint_in_thread_scope): Adjust to use inferior_thread. (breakpoint_kind): Adjust. (remove_breakpoints_pid): Rename to ... (remove_breakpoints_inf): ... this. Adjust to take an inferior pointer. All callers adjusted. (bpstat_clear_actions): Use inferior_thread. (get_bpstat_thread): New. (bpstat_do_actions): Use it. (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust to take a thread_info pointer. All callers adjusted. (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint) (breakpoint_re_set_thread): Use inferior_thread. * breakpoint.h (struct inferior): Forward declare. (bpstat_stop_status): Update. (remove_breakpoints_pid): Delete. (remove_breakpoints_inf): New. * bsd-uthread.c (bsd_uthread_target::wait) (bsd_uthread_target::update_thread_list): Use find_thread_ptid. * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch) (maint_btrace_packet_history_cmd) (maint_btrace_clear_packet_history_cmd): Adjust. (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use inferior_thread. * cli/cli-interp.c: Include "inferior.h". * common/refcounted-object.h (struct refcounted_object_ref_policy): New. * compile/compile-object-load.c: Include gdbthread.h. (store_regs): Use inferior_thread. * corelow.c (core_target::close): Use current_inferior. (core_target_open): Adjust to use first_thread_of_inferior and use the current inferior. * ctf.c (ctf_target::close): Adjust to use current_inferior. * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ... <thread>: ... this new field. All references adjusted. (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor): Take a thread_info pointer instead of a ptid_t. * dummy-frame.h (dummy_frame_push, dummy_frame_pop) (dummy_frame_discard, register_dummy_frame_dtor): Take a thread_info pointer instead of a ptid_t. * elfread.c: Include "inferior.h". (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop): Use inferior_thread. * eval.c (evaluate_subexp): Likewise. * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use inferior_thread. * gdb_proc_service.h (struct thread_info): Forward declare. (struct ps_prochandle) <ptid>: Delete, replaced by ... <thread>: ... this new field. All references adjusted. * gdbarch.h, gdbarch.c: Regenerate. * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a 'thread' parameter. All implementations and callers adjusted. * gdbthread.h (thread_info) <set_running>: New method. (delete_thread, delete_thread_silent): Take a thread_info pointer instead of a ptid. (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete. (first_thread_of_process): Delete, replaced by ... (first_thread_of_inferior): ... this new function. All callers adjusted. (any_live_thread_of_process): Delete, replaced by ... (any_live_thread_of_inferior): ... this new function. All callers adjusted. (switch_to_thread, switch_to_no_thread): Declare. (is_executing): Delete. (enable_thread_stack_temporaries): Update comment. <enable_thread_stack_temporaries>: Take a thread_info pointer instead of a ptid_t. Incref the thread. <~enable_thread_stack_temporaries>: Decref the thread. <m_ptid>: Delete <m_thr>: New. (thread_stack_temporaries_enabled_p, push_thread_stack_temporary) (get_last_thread_stack_temporary) (value_in_thread_stack_temporaries, can_access_registers_thread): Take a thread_info pointer instead of a ptid_t. All callers adjusted. * infcall.c (get_call_return_value): Use inferior_thread. (run_inferior_call): Work with thread pointers instead of ptid_t. (call_function_by_hand_dummy): Work with thread pointers instead of ptid_t. Use thread_info_ref. * infcmd.c (proceed_thread_callback): Access thread's state directly. (ensure_valid_thread, ensure_not_running): Use inferior_thread, access thread's state directly. (continue_command): Use inferior_thread. (info_program_command): Use find_thread_ptid and access thread state directly. (proceed_after_attach_callback): Use thread state directly. (notice_new_inferior): Take a thread_info pointer instead of a ptid_t. All callers adjusted. (exit_inferior): Take an inferior pointer instead of a pid. All callers adjusted. (exit_inferior_silent): New. (detach_inferior): Delete. (valid_gdb_inferior_id, pid_to_gdb_inferior_id) (gdb_inferior_id_to_pid, in_inferior_list): Delete. (detach_inferior_command, kill_inferior_command): Use find_inferior_id instead of valid_gdb_inferior_id and gdb_inferior_id_to_pid. (inferior_command): Use inferior and thread pointers. * inferior.h (struct thread_info): Forward declare. (notice_new_inferior): Take a thread_info pointer instead of a ptid_t. All callers adjusted. (detach_inferior): Delete declaration. (exit_inferior, exit_inferior_silent): Take an inferior pointer instead of a pid. All callers adjusted. (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list) (valid_gdb_inferior_id): Delete. * infrun.c (follow_fork_inferior, proceed_after_vfork_done) (handle_vfork_child_exec_or_exit, follow_exec): Adjust. (struct displaced_step_inferior_state) <pid>: Delete, replaced by ... <inf>: ... this new field. <step_ptid>: Delete, replaced by ... <step_thread>: ... this new field. (get_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (displaced_step_in_progress_any_inferior): Adjust. (displaced_step_in_progress_thread): Take a thread pointer instead of a ptid_t. All callers adjusted. (displaced_step_in_progress, add_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (get_displaced_step_closure_by_addr): Adjust. (remove_displaced_stepping_state): Take an inferior pointer instead of a pid. All callers adjusted. (displaced_step_prepare_throw, displaced_step_prepare) (displaced_step_fixup): Take a thread pointer instead of a ptid_t. All callers adjusted. (start_step_over): Adjust. (infrun_thread_ptid_changed): Remove bit updating ptids in the displaced step queue. (do_target_resume): Adjust. (fetch_inferior_event): Use inferior_thread. (context_switch, get_inferior_stop_soon): Take an execution_control_state pointer instead of a ptid_t. All callers adjusted. (switch_to_thread_cleanup): Delete. (stop_all_threads): Use scoped_restore_current_thread. * inline-frame.c: Include "gdbthread.h". (inline_state) <inline_state>: Take a thread pointer instead of a ptid_t. All callers adjusted. <ptid>: Delete, replaced by ... <thread>: ... this new field. (find_inline_frame_state): Take a thread pointer instead of a ptid_t. All callers adjusted. (skip_inline_frames, step_into_inline_frame) (inline_skipped_frames, inline_skipped_symbol): Take a thread pointer instead of a ptid_t. All callers adjusted. * inline-frame.h (skip_inline_frames, step_into_inline_frame) (inline_skipped_frames, inline_skipped_symbol): Likewise. * linux-fork.c (delete_checkpoint_command): Adjust to use thread pointers directly. * linux-nat.c (get_detach_signal): Likewise. * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter. (thread_db_notice_clone): Adjust. (thread_db_find_new_threads_silently) (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take a thread pointer instead of a ptid_t. All callers adjusted. * mi/mi-cmd-var.c: Include "inferior.h". (mi_cmd_var_update_iter): Update to use thread pointers. * mi/mi-interp.c (mi_new_thread): Update to use the thread's inferior directly. (mi_output_running_pid, mi_inferior_count): Delete, bits factored out to ... (mi_output_running): ... this new function. (mi_on_resume_1): Adjust to use it. (mi_user_selected_context_changed): Adjust to use inferior_thread. * mi/mi-main.c (proceed_thread): Adjust to use thread pointers directly. (interrupt_thread_callback): : Adjust to use thread and inferior pointers. * proc-service.c: Include "gdbthread.h". (ps_pglobal_lookup): Adjust to use the thread's inferior directly. * progspace-and-thread.c: Include "inferior.h". * progspace.c: Include "inferior.h". * python/py-exitedevent.c (create_exited_event_object): Adjust to hold a reference to an inferior_object. * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use inferior_thread. * python/py-inferior.c (struct inferior_object): Give the type a tag name instead of a typedef. (python_on_normal_stop): No need to check if the current thread is listed. (inferior_to_inferior_object): Change return type to inferior_object. All callers adjusted. (find_thread_object): Delete, bits factored out to ... (thread_to_thread_object): ... this new function. * python/py-infthread.c (create_thread_object): Use inferior_to_inferior_object. (thpy_is_stopped): Use thread pointer directly. (gdbpy_selected_thread): Use inferior_thread. * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (btpy_insn_or_gap_new): Drop const. (btpy_list_new): Take a thread pointer instead of a ptid_t. All callers adjusted. * python/py-record.c: Include "gdbthread.h". (recpy_insn_new, recpy_func_new): Take a thread pointer instead of a ptid_t. All callers adjusted. (gdbpy_current_recording): Use inferior_thread. * python/py-record.h (recpy_record_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (recpy_element_object) <ptid>: Delete field, replaced with ... <thread>: ... this new field. All users adjusted. (recpy_insn_new, recpy_func_new): Take a thread pointer instead of a ptid_t. All callers adjusted. * python/py-threadevent.c: Include "gdbthread.h". (get_event_thread): Use thread_to_thread_object. * python/python-internal.h (struct inferior_object): Forward declare. (find_thread_object, find_inferior_object): Delete declarations. (thread_to_thread_object, inferior_to_inferior_object): New declarations. * record-btrace.c: Include "inferior.h". (require_btrace_thread): Use inferior_thread. (record_btrace_frame_sniffer) (record_btrace_tailcall_frame_sniffer): Use inferior_thread. (get_thread_current_frame): Use scoped_restore_current_thread and switch_to_thread. (get_thread_current_frame): Use thread pointer directly. (record_btrace_replay_at_breakpoint): Use thread's inferior pointer directly. * record-full.c: Include "inferior.h". * regcache.c: Include "gdbthread.h". (get_thread_arch_regcache): Use the inferior's address space directly. (get_thread_regcache, registers_changed_thread): New. * regcache.h (get_thread_regcache(thread_info *thread)): New overload. (registers_changed_thread): New. (remote_target) <remote_detach_1>: Swap order of parameters. (remote_add_thread): <remote_add_thread>: Return the new thread. (get_remote_thread_info(ptid_t)): New overload. (remote_target::remote_notice_new_inferior): Use thread pointers directly. (remote_target::process_initial_stop_replies): Use thread_info::set_running. (remote_target::remote_detach_1, remote_target::detach) (extended_remote_target::detach): Adjust. * stack.c (frame_show_address): Use inferior_thread. * target-debug.h (target_debug_print_thread_info_pp): New. * target-delegates.c: Regenerate. * target.c (default_thread_address_space): Delete. (memory_xfer_partial_1): Use current_inferior. (target_detach): Use current_inferior. (target_thread_address_space): Delete. (generic_mourn_inferior): Use current_inferior. * target.h (struct target_ops) <thread_address_space>: Delete. (target_thread_address_space): Delete. * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread pointers directly. (delete_thread_1, delete_thread, delete_thread_silent): Take a thread pointer instead of a ptid_t. Adjust all callers. (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete. (first_thread_of_process): Delete, replaced by ... (first_thread_of_inferior): ... this new function. All callers adjusted. (any_thread_of_process): Rename to ... (any_thread_of_inferior): ... this, and take an inferior pointer. (any_live_thread_of_process): Rename to ... (any_live_thread_of_inferior): ... this, and take an inferior pointer. (thread_stack_temporaries_enabled_p, push_thread_stack_temporary) (value_in_thread_stack_temporaries) (get_last_thread_stack_temporary): Take a thread pointer instead of a ptid_t. Adjust all callers. (thread_info::set_running): New. (validate_registers_access): Use inferior_thread. (can_access_registers_ptid): Rename to ... (can_access_registers_thread): ... this, and take a thread pointer. (print_thread_info_1): Adjust to compare thread pointers instead of ptids. (switch_to_no_thread, switch_to_thread): Make extern. (scoped_restore_current_thread::~scoped_restore_current_thread): Use m_thread pointer directly. (scoped_restore_current_thread::scoped_restore_current_thread): Use inferior_thread. (thread_command): Use thread pointer directly. (thread_num_make_value_helper): Use inferior_thread. * top.c (execute_command): Use inferior_thread. * tui/tui-interp.c: Include "inferior.h". * varobj.c (varobj_create): Use inferior_thread. (value_of_root_1): Use find_thread_global_id instead of global_thread_id_to_ptid.
419 lines
13 KiB
C++
419 lines
13 KiB
C++
/* Ada language support definitions for GDB, the GNU debugger.
|
|
|
|
Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#if !defined (ADA_LANG_H)
|
|
#define ADA_LANG_H 1
|
|
|
|
struct frame_info;
|
|
struct inferior;
|
|
struct type_print_options;
|
|
struct parser_state;
|
|
|
|
#include "value.h"
|
|
#include "gdbtypes.h"
|
|
#include "breakpoint.h"
|
|
#include "vec.h"
|
|
|
|
/* Names of specific files known to be part of the runtime
|
|
system and that might consider (confusing) debugging information.
|
|
Each name (a basic regular expression string) is followed by a
|
|
comma. FIXME: Should be part of a configuration file. */
|
|
#if defined (__linux__)
|
|
#define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \
|
|
"^[agis]-.*\\.ad[bs]$", \
|
|
"/lib.*/libpthread\\.so[.0-9]*$", "/lib.*/libpthread\\.a$", \
|
|
"/lib.*/libc\\.so[.0-9]*$", "/lib.*/libc\\.a$",
|
|
#endif
|
|
|
|
#if !defined (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS)
|
|
#define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \
|
|
"^unwind-seh.c$", \
|
|
"^[agis]-.*\\.ad[bs]$",
|
|
#endif
|
|
|
|
/* Names of compiler-generated auxiliary functions probably of no
|
|
interest to users. Each name (a basic regular expression string)
|
|
is followed by a comma. */
|
|
#define ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS \
|
|
"___clean[.$a-zA-Z0-9_]*$", \
|
|
"___finalizer[.$a-zA-Z0-9_]*$",
|
|
|
|
/* The maximum number of frame levels searched for non-local,
|
|
* non-global symbols. This limit exists as a precaution to prevent
|
|
* infinite search loops when the stack is screwed up. */
|
|
#define MAX_ENCLOSING_FRAME_LEVELS 7
|
|
|
|
/* Maximum number of steps followed in looking for the ultimate
|
|
referent of a renaming. This prevents certain infinite loops that
|
|
can otherwise result. */
|
|
#define MAX_RENAMING_CHAIN_LENGTH 10
|
|
|
|
struct block;
|
|
|
|
/* Corresponding encoded/decoded names and opcodes for Ada user-definable
|
|
operators. */
|
|
struct ada_opname_map
|
|
{
|
|
const char *encoded;
|
|
const char *decoded;
|
|
enum exp_opcode op;
|
|
};
|
|
|
|
/* Table of Ada operators in encoded and decoded forms. */
|
|
/* Defined in ada-lang.c */
|
|
extern const struct ada_opname_map ada_opname_table[];
|
|
|
|
/* Denotes a type of renaming symbol (see ada_parse_renaming). */
|
|
enum ada_renaming_category
|
|
{
|
|
/* Indicates a symbol that does not encode a renaming. */
|
|
ADA_NOT_RENAMING,
|
|
|
|
/* For symbols declared
|
|
Foo : TYPE renamed OBJECT; */
|
|
ADA_OBJECT_RENAMING,
|
|
|
|
/* For symbols declared
|
|
Foo : exception renames EXCEPTION; */
|
|
ADA_EXCEPTION_RENAMING,
|
|
/* For packages declared
|
|
package Foo renames PACKAGE; */
|
|
ADA_PACKAGE_RENAMING,
|
|
/* For subprograms declared
|
|
SUBPROGRAM_SPEC renames SUBPROGRAM;
|
|
(Currently not used). */
|
|
ADA_SUBPROGRAM_RENAMING
|
|
};
|
|
|
|
/* The different types of catchpoints that we introduced for catching
|
|
Ada exceptions. */
|
|
|
|
enum ada_exception_catchpoint_kind
|
|
{
|
|
ada_catch_exception,
|
|
ada_catch_exception_unhandled,
|
|
ada_catch_assert,
|
|
ada_catch_handlers
|
|
};
|
|
|
|
/* Ada task structures. */
|
|
|
|
struct ada_task_info
|
|
{
|
|
/* The PTID of the thread that this task runs on. This ptid is computed
|
|
in a target-dependent way from the associated Task Control Block. */
|
|
ptid_t ptid;
|
|
|
|
/* The ID of the task. */
|
|
CORE_ADDR task_id;
|
|
|
|
/* The name of the task. */
|
|
char name[257];
|
|
|
|
/* The current state of the task. */
|
|
int state;
|
|
|
|
/* The priority associated to the task. */
|
|
int priority;
|
|
|
|
/* If non-zero, the task ID of the parent task. */
|
|
CORE_ADDR parent;
|
|
|
|
/* If the task is waiting on a task entry, this field contains
|
|
the ID of the other task. Zero otherwise. */
|
|
CORE_ADDR called_task;
|
|
|
|
/* If the task is accepting a rendezvous with another task, this field
|
|
contains the ID of the calling task. Zero otherwise. */
|
|
CORE_ADDR caller_task;
|
|
|
|
/* The CPU on which the task is running. This is dependent on
|
|
the runtime actually providing that info, which is not always
|
|
the case. Normally, we should be able to count on it on
|
|
bare-metal targets. */
|
|
int base_cpu;
|
|
};
|
|
|
|
/* Assuming V points to an array of S objects, make sure that it contains at
|
|
least M objects, updating V and S as necessary. */
|
|
|
|
#define GROW_VECT(v, s, m) \
|
|
if ((s) < (m)) (v) = (char *) grow_vect (v, &(s), m, sizeof *(v));
|
|
|
|
extern void *grow_vect (void *, size_t *, size_t, int);
|
|
|
|
extern void ada_ensure_varsize_limit (const struct type *type);
|
|
|
|
extern int ada_get_field_index (const struct type *type,
|
|
const char *field_name,
|
|
int maybe_missing);
|
|
|
|
extern int ada_parse (struct parser_state *); /* Defined in ada-exp.y */
|
|
|
|
/* Defined in ada-typeprint.c */
|
|
extern void ada_print_type (struct type *, const char *, struct ui_file *, int,
|
|
int, const struct type_print_options *);
|
|
|
|
extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
|
|
struct ui_file *stream);
|
|
|
|
extern void ada_val_print (struct type *, int, CORE_ADDR,
|
|
struct ui_file *, int,
|
|
struct value *,
|
|
const struct value_print_options *);
|
|
|
|
extern void ada_value_print (struct value *, struct ui_file *,
|
|
const struct value_print_options *);
|
|
|
|
/* Defined in ada-lang.c */
|
|
|
|
extern void ada_emit_char (int, struct type *, struct ui_file *, int, int);
|
|
|
|
extern void ada_printchar (int, struct type *, struct ui_file *);
|
|
|
|
extern void ada_printstr (struct ui_file *, struct type *, const gdb_byte *,
|
|
unsigned int, const char *, int,
|
|
const struct value_print_options *);
|
|
|
|
struct value *ada_convert_actual (struct value *actual,
|
|
struct type *formal_type0);
|
|
|
|
extern struct value *ada_value_subscript (struct value *, int,
|
|
struct value **);
|
|
|
|
extern void ada_fixup_array_indexes_type (struct type *index_desc_type);
|
|
|
|
extern struct type *ada_array_element_type (struct type *, int);
|
|
|
|
extern int ada_array_arity (struct type *);
|
|
|
|
struct type *ada_type_of_array (struct value *, int);
|
|
|
|
extern struct value *ada_coerce_to_simple_array_ptr (struct value *);
|
|
|
|
struct value *ada_coerce_to_simple_array (struct value *);
|
|
|
|
extern int ada_is_simple_array_type (struct type *);
|
|
|
|
extern int ada_is_array_descriptor_type (struct type *);
|
|
|
|
extern int ada_is_bogus_array_descriptor (struct type *);
|
|
|
|
extern LONGEST ada_discrete_type_low_bound (struct type *);
|
|
|
|
extern LONGEST ada_discrete_type_high_bound (struct type *);
|
|
|
|
extern struct value *ada_get_decoded_value (struct value *value);
|
|
|
|
extern struct type *ada_get_decoded_type (struct type *type);
|
|
|
|
extern const char *ada_decode_symbol (const struct general_symbol_info *);
|
|
|
|
extern const char *ada_decode (const char*);
|
|
|
|
extern enum language ada_update_initial_language (enum language);
|
|
|
|
extern int ada_lookup_symbol_list (const char *, const struct block *,
|
|
domain_enum,
|
|
std::vector<struct block_symbol> *);
|
|
|
|
extern char *ada_fold_name (const char *);
|
|
|
|
extern struct block_symbol ada_lookup_symbol (const char *,
|
|
const struct block *,
|
|
domain_enum, int *);
|
|
|
|
extern void ada_lookup_encoded_symbol
|
|
(const char *name, const struct block *block, domain_enum domain,
|
|
struct block_symbol *symbol_info);
|
|
|
|
extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *);
|
|
|
|
extern void ada_fill_in_ada_prototype (struct symbol *);
|
|
|
|
extern int user_select_syms (struct block_symbol *, int, int);
|
|
|
|
extern int get_selections (int *, int, int, int, const char *);
|
|
|
|
extern int ada_scan_number (const char *, int, LONGEST *, int *);
|
|
|
|
extern struct type *ada_parent_type (struct type *);
|
|
|
|
extern int ada_is_ignored_field (struct type *, int);
|
|
|
|
extern int ada_is_constrained_packed_array_type (struct type *);
|
|
|
|
extern struct value *ada_value_primitive_packed_val (struct value *,
|
|
const gdb_byte *,
|
|
long, int, int,
|
|
struct type *);
|
|
|
|
extern struct type *ada_coerce_to_simple_array_type (struct type *);
|
|
|
|
extern int ada_is_character_type (struct type *);
|
|
|
|
extern int ada_is_string_type (struct type *);
|
|
|
|
extern int ada_is_tagged_type (struct type *, int);
|
|
|
|
extern int ada_is_tag_type (struct type *);
|
|
|
|
extern struct type *ada_tag_type (struct value *);
|
|
|
|
extern struct value *ada_value_tag (struct value *);
|
|
|
|
extern const char *ada_tag_name (struct value *);
|
|
|
|
extern struct value *ada_tag_value_at_base_address (struct value *obj);
|
|
|
|
extern int ada_is_parent_field (struct type *, int);
|
|
|
|
extern int ada_is_wrapper_field (struct type *, int);
|
|
|
|
extern int ada_is_variant_part (struct type *, int);
|
|
|
|
extern struct type *ada_variant_discrim_type (struct type *, struct type *);
|
|
|
|
extern int ada_is_others_clause (struct type *, int);
|
|
|
|
extern int ada_in_variant (LONGEST, struct type *, int);
|
|
|
|
extern const char *ada_variant_discrim_name (struct type *);
|
|
|
|
extern struct value *ada_value_struct_elt (struct value *, const char *, int);
|
|
|
|
extern int ada_is_aligner_type (struct type *);
|
|
|
|
extern struct type *ada_aligned_type (struct type *);
|
|
|
|
extern const gdb_byte *ada_aligned_value_addr (struct type *,
|
|
const gdb_byte *);
|
|
|
|
extern const char *ada_attribute_name (enum exp_opcode);
|
|
|
|
extern int ada_is_fixed_point_type (struct type *);
|
|
|
|
extern int ada_is_system_address_type (struct type *);
|
|
|
|
extern struct value *ada_delta (struct type *);
|
|
|
|
extern struct value *ada_scaling_factor (struct type *);
|
|
|
|
extern struct type *ada_system_address_type (void);
|
|
|
|
extern int ada_which_variant_applies (struct type *, struct type *,
|
|
const gdb_byte *);
|
|
|
|
extern struct type *ada_to_fixed_type (struct type *, const gdb_byte *,
|
|
CORE_ADDR, struct value *,
|
|
int check_tag);
|
|
|
|
extern struct value *ada_to_fixed_value (struct value *val);
|
|
|
|
extern struct type *ada_template_to_fixed_record_type_1 (struct type *type,
|
|
const gdb_byte *valaddr,
|
|
CORE_ADDR address,
|
|
struct value *dval0,
|
|
int keep_dynamic_fields);
|
|
|
|
extern int ada_name_prefix_len (const char *);
|
|
|
|
extern const char *ada_type_name (struct type *);
|
|
|
|
extern struct type *ada_find_parallel_type (struct type *,
|
|
const char *suffix);
|
|
|
|
extern bool get_int_var_value (const char *, LONGEST &value);
|
|
|
|
extern struct symbol *ada_find_renaming_symbol (struct symbol *name_sym,
|
|
const struct block *block);
|
|
|
|
extern int ada_prefer_type (struct type *, struct type *);
|
|
|
|
extern struct type *ada_get_base_type (struct type *);
|
|
|
|
extern struct type *ada_check_typedef (struct type *);
|
|
|
|
extern char *ada_encode (const char *);
|
|
|
|
extern const char *ada_enum_name (const char *);
|
|
|
|
extern int ada_is_modular_type (struct type *);
|
|
|
|
extern ULONGEST ada_modulus (struct type *);
|
|
|
|
extern struct value *ada_value_ind (struct value *);
|
|
|
|
extern void ada_print_scalar (struct type *, LONGEST, struct ui_file *);
|
|
|
|
extern int ada_is_range_type_name (const char *);
|
|
|
|
extern enum ada_renaming_category ada_parse_renaming (struct symbol *,
|
|
const char **,
|
|
int *, const char **);
|
|
|
|
extern void ada_find_printable_frame (struct frame_info *fi);
|
|
|
|
extern char *ada_breakpoint_rewrite (char *, int *);
|
|
|
|
extern char *ada_main_name (void);
|
|
|
|
extern void create_ada_exception_catchpoint
|
|
(struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind,
|
|
const std::string &excep_string, const std::string &cond_string, int tempflag,
|
|
int disabled, int from_tty);
|
|
|
|
/* Some information about a given Ada exception. */
|
|
|
|
struct ada_exc_info
|
|
{
|
|
/* The name of the exception. */
|
|
const char *name;
|
|
|
|
/* The address of the symbol corresponding to that exception. */
|
|
CORE_ADDR addr;
|
|
|
|
bool operator< (const ada_exc_info &) const;
|
|
bool operator== (const ada_exc_info &) const;
|
|
};
|
|
|
|
extern std::vector<ada_exc_info> ada_exceptions_list (const char *regexp);
|
|
|
|
/* Tasking-related: ada-tasks.c */
|
|
|
|
extern int valid_task_id (int);
|
|
|
|
extern struct ada_task_info *ada_get_task_info_from_ptid (ptid_t ptid);
|
|
|
|
extern int ada_get_task_number (thread_info *thread);
|
|
|
|
typedef void (ada_task_list_iterator_ftype) (struct ada_task_info *task);
|
|
extern void iterate_over_live_ada_tasks
|
|
(ada_task_list_iterator_ftype *iterator);
|
|
|
|
extern const char *ada_get_tcb_types_info (void);
|
|
|
|
extern int ada_build_task_list (void);
|
|
|
|
extern void print_ada_task_info (struct ui_out *uiout,
|
|
char *taskno_str,
|
|
struct inferior *inf);
|
|
|
|
#endif
|