GDB (xrefs)
|
#include "defs.h"
#include "interps.h"
#include "ui-out.h"
#include "command.h"
#include "cli/cli-script.h"
#include "cli/cli-utils.h"
#include "completer.h"
#include "gdbcmd.h"
#include "compile.h"
#include "compile-internal.h"
#include "compile-object-load.h"
#include "compile-object-run.h"
#include "language.h"
#include "frame.h"
#include "source.h"
#include "block.h"
#include "arch-utils.h"
#include "filestuff.h"
#include "target.h"
#include "osabi.h"
#include "gdb_wait.h"
#include "valprint.h"
Go to the source code of this file.
Macros | |
#define | TMP_PREFIX "/tmp/gdbobj-" |
#define | TEMPLATE TMP_PREFIX "XXXXXX" |
Functions | |
static void | show_compile_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static int | check_raw_argument (char **arg) |
static void | compile_file_command (char *arg, int from_tty) |
static void | compile_code_command (char *arg, int from_tty) |
void | compile_print_value (struct value *val, void *data_voidp) |
static void | compile_print_command (char *arg_param, int from_tty) |
static void | do_rmdir (void *arg) |
static const char * | get_compile_file_tempdir (void) |
static void | get_new_file_names (char **source_file, char **object_file) |
static const struct block * | get_expr_block_and_pc (CORE_ADDR *pc) |
static void | build_argc_argv (const char *s, int *argcp, char ***argvp) |
static void | set_compile_args (char *args, int from_tty, struct cmd_list_element *c) |
static void | show_compile_args (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | append_args (int *argcp, char ***argvp, int argc, char **argv) |
static const char * | get_selected_pc_producer_options (void) |
static void | filter_args (int *argcp, char **argv) |
static void | get_args (const struct compile_instance *compiler, struct gdbarch *gdbarch, int *argcp, char ***argvp) |
static void | cleanup_compile_instance (void *arg) |
static void | cleanup_unlink_file (void *arg) |
static void | print_callback (void *ignore, const char *message) |
static char * | compile_to_object (struct command_line *cmd, const char *cmd_string, enum compile_i_scope_types scope, char **source_filep) |
static void | compile_command (char *args, int from_tty) |
void | eval_compile_command (struct command_line *cmd, const char *cmd_string, enum compile_i_scope_types scope, void *scope_data) |
char * | compile_register_name_mangled (struct gdbarch *gdbarch, int regnum) |
int | compile_register_name_demangle (struct gdbarch *gdbarch, const char *regname) |
void | _initialize_compile (void) |
Variables | |
static struct cmd_list_element * | compile_command_list |
int | compile_debug |
static char * | compile_args |
static int | compile_args_argc |
static char ** | compile_args_argv |
initialize_file_ftype | _initialize_compile |
#define TEMPLATE TMP_PREFIX "XXXXXX" |
Referenced by get_compile_file_tempdir().
#define TMP_PREFIX "/tmp/gdbobj-" |
Definition at line 47 of file compile.c.
Referenced by do_rmdir().
void _initialize_compile | ( | void | ) |
Definition at line 671 of file compile.c.
References _, add_cmd(), add_com_alias(), add_prefix_cmd(), add_setshow_boolean_cmd(), add_setshow_string_cmd(), class_maintenance, class_obscure, class_support, cmdlist, compile_args, compile_code_command(), compile_command(), compile_debug, compile_file_command(), compile_print_command(), set_cmd_completer(), set_compile_args(), setdebuglist, setlist, show_compile_args(), show_compile_debug(), showdebuglist, and showlist.
Definition at line 300 of file compile.c.
References gdb_buildargv().
Referenced by get_args(), and set_compile_args().
|
static |
Definition at line 72 of file compile.c.
References check_for_argument(), and skip_spaces().
Referenced by compile_code_command(), and compile_file_command().
|
static |
Definition at line 432 of file compile.c.
References compile_instance::destroy.
Referenced by compile_to_object().
|
static |
Definition at line 442 of file compile.c.
Referenced by compile_to_object(), and eval_compile_command().
|
static |
Definition at line 131 of file compile.c.
References _, check_for_argument(), check_raw_argument(), command_line::compile, compile_control, COMPILE_I_RAW_SCOPE, COMPILE_I_SIMPLE_SCOPE, command_line::control_u, do_cleanups(), error(), eval_compile_command(), execute_control_command_untraced(), get_command_line(), interpreter_async, make_cleanup_free_command_lines(), make_cleanup_restore_integer(), command_line::scope, and skip_spaces().
Referenced by _initialize_compile(), and compile_command().
|
static |
Definition at line 598 of file compile.c.
References compile_code_command().
Referenced by _initialize_compile().
|
static |
Definition at line 88 of file compile.c.
References _, check_raw_argument(), COMPILE_I_RAW_SCOPE, COMPILE_I_SIMPLE_SCOPE, do_cleanups(), error(), eval_compile_command(), gdb_abspath(), interpreter_async, make_cleanup(), make_cleanup_restore_integer(), skip_spaces(), xfree(), and xstrprintf().
Referenced by _initialize_compile().
|
static |
Definition at line 183 of file compile.c.
References command_line::compile, compile_control, COMPILE_I_PRINT_ADDRESS_SCOPE, command_line::control_u, do_cleanups(), eval_compile_command(), execute_control_command_untraced(), get_command_line(), interpreter_async, make_cleanup_free_command_lines(), make_cleanup_restore_integer(), print_command_parse_format(), and command_line::scope.
Referenced by _initialize_compile().
void compile_print_value | ( | struct value * | val, |
void * | data_voidp | ||
) |
Definition at line 170 of file compile.c.
References print_value().
Referenced by do_module_cleanup().
Definition at line 652 of file compile.c.
References _, error(), gdbarch_num_regs(), gdbarch_register_name(), and regnum.
Referenced by store_regs().
Definition at line 642 of file compile.c.
References gdbarch_register_name(), and xstrprintf().
Referenced by generate_register_struct(), pushf_register(), and pushf_register_address().
|
static |
Definition at line 464 of file compile.c.
References _, compile_instance::block, command_line::body_list, cleanup_compile_instance(), cleanup_unlink_file(), code, compile_debug, current_language, discard_cleanups(), do_cleanups(), error(), compile_instance::fe, fprintf_unfiltered(), fputs_unfiltered(), gdb_fopen_cloexec(), gdb_stdlog, gdbarch_gnu_triplet_regexp(), gdbarch_osabi(), get_args(), get_current_arch(), get_expr_block_and_pc(), get_frame_address_in_block(), get_new_file_names(), get_selected_frame(), language_defn::la_compute_program, language_defn::la_get_compile_instance, command_line::line, make_cleanup(), make_cleanup_freeargv(), make_cleanup_ui_file_delete(), mem_fileopen(), command_line::next, osabi_triplet_regexp(), perror_with_name(), print_callback(), compile_instance::scope, target_has_execution, ui_file_xstrdup(), and xfree().
Referenced by eval_compile_command().
|
static |
Definition at line 215 of file compile.c.
References _, gdb_assert, startswith(), TMP_PREFIX, warning(), WEXITSTATUS, and WIFEXITED.
Referenced by get_compile_file_tempdir().
void eval_compile_command | ( | struct command_line * | cmd, |
const char * | cmd_string, | ||
enum compile_i_scope_types | scope, | ||
void * | scope_data | ||
) |
Definition at line 608 of file compile.c.
References cleanup_unlink_file(), COMPILE_I_PRINT_ADDRESS_SCOPE, COMPILE_I_PRINT_VALUE_SCOPE, compile_object_load(), compile_object_run(), compile_to_object(), discard_cleanups(), do_cleanups(), eval_compile_command(), gdb_assert, make_cleanup(), and xfree().
Referenced by compile_code_command(), compile_file_command(), compile_print_command(), eval_compile_command(), and execute_control_command().
|
static |
|
static |
Definition at line 399 of file compile.c.
References append_args(), build_argc_argv(), compile_args_argc, compile_args_argv, filter_args(), compile_instance::gcc_target_options, gdbarch_gcc_target_options(), and get_selected_pc_producer_options().
Referenced by compile_to_object().
|
static |
Definition at line 233 of file compile.c.
References _, do_rmdir(), error(), make_final_cleanup(), perror_with_name(), and TEMPLATE.
Referenced by get_new_file_names().
Definition at line 275 of file compile.c.
References BLOCK_START, BLOCKVECTOR_BLOCK, get_current_source_symtab_and_line(), get_selected_block(), STATIC_BLOCK, symtab_and_line::symtab, and SYMTAB_BLOCKVECTOR.
Referenced by compile_to_object().
|
static |
Definition at line 262 of file compile.c.
References get_compile_file_tempdir(), SLASH_STRING, and xstrprintf().
Referenced by compile_to_object().
|
static |
Definition at line 355 of file compile.c.
References find_pc_compunit_symtab(), get_frame_pc(), get_selected_frame(), symtab_and_line::pc, compunit_symtab::producer, skip_spaces_const(), skip_to_space_const(), and startswith().
Referenced by get_args().
|
static |
Definition at line 453 of file compile.c.
References fputs_filtered(), and gdb_stderr.
Referenced by compile_to_object().
|
static |
Definition at line 316 of file compile.c.
References build_argc_argv(), compile_args, compile_args_argc, and compile_args_argv.
Referenced by _initialize_compile().
|
static |
Definition at line 325 of file compile.c.
References _, and fprintf_filtered().
Referenced by _initialize_compile().
|
static |
Definition at line 60 of file compile.c.
References _, and fprintf_filtered().
Referenced by _initialize_compile().
initialize_file_ftype _initialize_compile |
|
static |
Definition at line 307 of file compile.c.
Referenced by _initialize_compile(), and set_compile_args().
|
static |
Definition at line 310 of file compile.c.
Referenced by get_args(), and set_compile_args().
|
static |
Definition at line 311 of file compile.c.
Referenced by get_args(), and set_compile_args().
|
static |
int compile_debug |
Definition at line 55 of file compile.c.
Referenced by _initialize_compile(), compile_object_load(), compile_to_object(), convert_symbol_sym(), gcc_convert_symbol(), gcc_symbol_address(), and setup_sections().