- make_cleanup (VEC_cleanup (cmdarg_s), &cmdarg_vec)
- interpreter_p = xstrdup (context->interpreter_p)
-
gdb_init (argv[0])
-
if (pre_init_ui_hook)
- pre_init_ui_hook ()
- init_cmd_lists
-
initialize_targets ()
- init_dummy_target
-
push_target (&dummy_target)
- update_current_target
-
if (set_args)
- symarg = argv[optind]
- execarg = argv[optind]
- set_inferior_args_vector (argc - optind, &argv[optind])
-
else
- symarg = argv[optind]
- execarg = argv[optind]
- get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit)
- interp = interp_lookup (interpreter_p)
-
if (system_gdbinit && !inhibit_gdbinit)
- catch_command_errors (source_script, system_gdbinit, 0, RETURN_MASK_ALL)
-
if (hoem_gdbinit && !inhibit_gdbinit)
- catch_command_errors (source_script, home_gdbinit, 0, RETURN_MASK_ALL)
-
for (i = 0; VEC_iterate (cmdarg_s, cmdarg_vec, i, cmdarg_p); i++)
-
case CMDARG_INIT_FILE
- catch_command_errors (source_script, cmdarg_p->string, !batch_flag, RETURN_MASK_ALL)
-
case CMDARG_INIT_COMMAND
- catch_command_errors (execute_command, cmdarg_p->string, !batch_flag, RETURN_MASK_ALL)
-
if (cdarg != NULL)
- catch_command_errors (cd_command, cdarg, 0, RETURN_MASK_ALL)
-
for (i = 0; i < ndir; i++)
- catch_command_errors (directory_switch, dirarg[i], 0, RETURN_MASK_ALL)
- save_auto_load = global_auto_load
- global_auto_load = 0
-
if (execarg != NULL && symarg != NULL && strcmp (execarg, symarg) == 0)
-
if (catch_command_errors (exec_file_attach, execarg, !batch_flag, RETURN_MASK_ALL)
- catch_command_errors (symbol_file_add_main, symarg, !batch_flag, RETURN_MASK_ALL)
-
else
-
if (execarg != NULL)
- catch_command_errors (exec_file_attach, execarg, !batch_flag, RETURN_MASK_ALL)
-
if (symarg != NULL)
- catch_command_errors (symbol_file_add_main, symarg, !batch_flag, RETURN_MASK_ALL)
-
if (corearg != NULL)
- catch_command_errors (core_file_command, corearg, !batch_flag, RETURN_MASK_ALL)
-
else if (pidarg != NULL)
- catch_command_errors (attach_command, pidarg, !batch_flag, RETURN_MASK_ALL)
- else if (pid_or_core_arg)
-
if (ttyarg != NULL)
- set_inferior_io_terminal (ttyarg)
-
if (local_gdbinit)
- auto_load_local_gdbinit_pathname =gdb_realpath (local_gdbinit)
-
if (...)
- catch_command_errors = (source_script, local_gdbinit, 0, RETURN_MASK_ALL)
-
for (i = 0; VEC_iterate (cmdarg_s, cmdarg_vec, i, cmdarg_p); i++)
-
case CMDARG_FILE
- catch_command_errors (source_script, cmdarg_p->string, !batch_flag, RETURN_MASK_ALL)
-
case CMDARG_COMMAND
- catch_command_errors (execute_command, cmdarg_p->string, !batch_flag, RETURN_MASK_ALL)
- init_history ()
-
if (batch_flag)
- quit_force (NULL, 0)
- do_cleanups (pre_stat_chain)
-
while (1)
- catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL)