1. gdb_server.c
    1. gdb_input_inner
      1. 'g'
        1. gdb_get_registers_packet
          1. target_get_gdb_reg_list
          2. target->type->get_gdb_reg_list
          3. andes_get_gdb_reg_list
          4. andes_reg_current
          5. andes_get_core_reg
          6. andes_reg->andes->read_core_reg
          7. andes_edm_read_core_reg
          8. edm_read_reg
      2. 'p'
        1. gdb_get_register_packet
          1. target_get_gdb_reg_list
          2. reg_list[reg_num]->type->get
      3. 'P'
        1. get_set_register_packet
          1. target_get_gdb_reg_list
          2. gdb_target_to_reg
          3. reglist[reg_num]->type->set
      4. 's' or 'c'
        1. gdb_thread_packet
        2. log_add_callback
        3. gdb_con->frontend_state = TARGET_RUNNING
        4. target_call_event_callback(TARGET_EVENT_GDB_START)
        5. gdb_step_continue_packet
          1. target_resume
          2. target_step
          3. target->type->step
          4. andes_v3_step
          5. andes_v3_nextpc
          6. enable HSS
          7. set DSSIM
          8. enable watchpoints
          9. andes_v3_leave_debug_state
          10. wait to halt
          11. andes_v3_debug_entry
          12. restore DSSIM
          13. disable HSS
          14. disable watchpoints
          15. target_call_event_callbacks
      5. 'm'
        1. gdb_read_memory_packet
          1. target_read_buffer
          2. target->type->read_buffer
          3. target_read_buffer_default
      6. 'X'
        1. gdb_write_memory_binary_packet
          1. target_write_buffer
          2. target->type->write_buffer
          3. target_write_buffer_default
          4. target->type->bulk_write_memory
          5. target_write_memory
          6. target->type->write_memory
          7. andes_write_memory
      7. 'z' or 'Z'
        1. gdb_breakpoint_watchpoint_packet
          1. breakpoint_add
          2. breakpoint_add_internal
          3. target_add_breakpoint
          4. target->type->add_breakpoint
          5. andes_v3_add_breakpoint
          6. breakpoint_remove
          7. breakpoint_remove_internal
          8. breakpoint_free
          9. target_remove_breakpoint
          10. target->type->remove_breakpoint
          11. andes_v3_remove_breakpoint
          12. watchpoint_add
          13. target_add_watchpoint
          14. target->type->add_watchpoint
          15. andes_v3_add_watchpoint
          16. watchpoint_remove
          17. target_remove_watchpoint
      8. 'q' or 'Q'
        1. gdb_thread_packet
        2. gdb_query_packet
          1. qCRC
          2. target_checksum_memory
          3. target->type->checksum_memory
  2. Target Request Data
    1. TARGET_REQ_TRACEMSG
      1. trace_point
    2. TARGET_REQ_DEBUGMSG
      1. target_asciimsg
        1. target->type->target_request_data
      2. target_hexmsg
        1. target->type->target_request_data
    3. TARGET_REQ_DEBUGCHAR
      1. target_charmsg
  3. openocd_main
    1. setup_command_handler
      1. log_init
      2. command_init
      3. command_registrants[i]
        1. openocd_register_commands
          1. "version"
          2. "noinit"
          3. "init"
          4. "add_script_search_dir"
        2. server_register_commands
          1. telnet_register_commands
          2. telnet_port = strdup("4444");
          3. "exit"
          4. "telnet_port"
          5. tcl_register_commands
          6. tcl_port = strdup("6666");
          7. "tcl_port"
          8. "shutdown"
        3. gdb_register_commands
          1. gdb_port = strdup("3333");
          2. gdb_port_next = strdup("3333");
          3. "gdb_sync"
          4. "gdb_port"
          5. "gdb_memory_map"
          6. "gdb_flash_program"
          7. "gdb_report_data_abort"
          8. "gdb_breakpoint_override"
        4. log_register_commands
          1. "log_output"
          2. "debug_level"
        5. transport_register_commands
          1. "transport init"
          2. "transport list"
          3. "transport select"
        6. interface_register_commands
          1. "adapter_khz"
          2. "adapter_name"
          3. "adapter_nsrst_delay"
          4. "adapter_nsrst_assert_width"
          5. "interface"
          6. handle_interface_command
          7. register_commands(jtag_interface[i]->commands)
          8. allow_transports (jtag_interface->transports)
          9. CALL_COMMAND_HANDLER(handle_interface_list_command)
          10. "interface_transports"
          11. "interface_list"
          12. "reset_config"
        7. target_register_commands
          1. "targets"
          2. "target init"
          3. "target create"
          4. jim_target_create
          5. target_create
          6. memcpy(target->type, target_types[x])
          7. target_configure
          8. target->type->target_jim_configure
          9. TCFG_TYPE
          10. TCFG_EVENT
          11. TCFG_WORK_AREA_VIRT
          12. TCFG_WORK_AREA_PHYS
          13. TCFG_WORK_AREA_SIZE
          14. TCFG_WORK_AREA_BACKUP
          15. TCFG_ENDIAN
          16. TCFG_VARIANT
          17. TCFG_COREID
          18. TCFG_CHAIN_POSITION
          19. TCFG_DBGBASE
          20. TCFG_RTOS
          21. register_commands(target->type->commands)
          22. target->type->target_create
          23. andes_v3_target_create
          24. andes_init_arch_info
          25. target->arch_info = andes
          26. andes->target = target
          27. andes->common_magic = ANDES_COMMON_MAGIC
          28. nds32_reg_init
          29. register_commands(target_commands)
          30. command_find_in_context
          31. command_set_handler_data
          32. c->jim_handler_data = target
          33. "target current"
          34. "target types"
          35. "target names"
          36. "target number"
          37. "target count"
          38. "target smp"
        8. flash_register_commands
          1. "flash bank"
          2. "flash init"
          3. "flash banks"
          4. "flash list"
        9. nand_register_commands
          1. "nand device"
          2. "nand drivers"
          3. "nand init"
        10. pld_register_commands
          1. "pld device"
          2. "pld init"
        11. mflash_register_commands
          1. "mflash bank"
          2. "mflash init"
      4. global_cmd_ctx = cmd_ctx;
    2. util_init
    3. ioutil_init
    4. command_context_mode(COMMAND_CONFIG)
    5. command_set_output_handler
    6. openocd_thread
      1. parse_cmdline_args
      2. server_preinit
      3. parse_config_file
      4. server_init
        1. tcl_init
          1. add_service
          2. c->new_connection = new_connection_handler;
          3. c->input = input_handler;
          4. c->connection_closed = connection_closed_handler;
          5. socket()
          6. bind()
          7. listen()
        2. telnet_init
          1. add_service
      5. command_run_line("init")
        1. command_run_line("target init");
          1. handle_target_init_command
          2. command_run_line("init_targets")
          3. command_run_line("init_board")
          4. target_init
          5. target_init_one
          6. target_reset_examined
          7. type->init_target
          8. andes_v3_init_target
          9. target_register_user_commands
          10. target_request_register_commands
          11. "target_request debugmsgs"
          12. trace_register_commands
          13. "trace history"
          14. "trace point"
          15. "fast_load_image"
          16. "fast_load"
          17. "profile"
          18. "virt2pyhs"
          19. "reg"
          20. "poll"
          21. "wait_halt"
          22. handle_wait_halt_command
          23. "halt"
          24. handle_halt_command
          25. target_halt
          26. target_was_examined
          27. target->type->halt
          28. andes_v3_halt
          29. edm->write_misc_reg (EDM_CMDR)
          30. andes_v3_debug_entry
          31. andes_v3->andes.target->state = TARGET_HALTED
          32. andes_v3_examine_debug_reason
          33. register_cache_invalidate
          34. andes_v3->andes.full_context
          35. andes_edm_full_context
          36. edm->prepare
          37. edm_read_reg
          38. edm->finish
          39. target_call_event_callbacks(TARGET_EVENT_DEBUG_HALTED/TARGET_EVENT_HALTED)
          40. handle_wait_halt_command
          41. target_wait_state
          42. target_poll
          43. target_was_examined
          44. target->type->poll
          45. andes_v3_poll
          46. edm->read_misc_reg(EDM_MISC_DBGER)
          47. target_call_event_callbacks(TARGET_EVENT_GDB_HALT)
          48. "resume"
          49. "reset"
          50. "soft_reset_halt"
          51. "step"
          52. "mdw"
          53. "mdh"
          54. "mdb"
          55. "mww"
          56. "mwh"
          57. "mwb"
          58. "bp"
          59. "rbp"
          60. "wp"
          61. "rwp"
          62. "load_image"
          63. "dump_image"
          64. "verify_image"
          65. "test_image"
          66. "mem2array"
          67. "array2mem"
          68. "reset_nag"
          69. "ps"
          70. target_register_timer_callback (&handle_target)
        2. adapter_init
          1. jtag_interface->init()
          2. jtag_get_speed_khz
          3. jtag_get_speed()
          4. jtag->speed()
          5. jtag_get_speed_readable()
        3. command_context_mode(COMMAND_EXEC)
        4. command_run_line("transport init");
          1. handle_transport_init
          2. session->init
          3. handle_transport_init
          4. aice_transport_init
          5. aice_init_targets
        5. target_examine
          1. target_examine_one
          2. target->type->examine()
          3. andes_v3_examine
          4. andes_edm_init
          5. andes_edm_setup
          6. andes_edm_config
          7. andes_build_reg_cache
          8. andes_edm_read_debug_reg (NDS_EDM_SR_EDM_CFG)
          9. target_set_examined
        6. command_context_mode(COMMAND_CONFIG)
        7. command_run_line("flash init");
        8. command_run_line("mflash init");
        9. command_run_line("nand init");
        10. command_run_line("pld init");
        11. command_context_mode(COMMAND_EXEC)
        12. gdb_target_add_all
        13. target_register_event_callback
      6. server_loop
        1. target_call_timer_callbacks
          1. target_call_timer_callbacks_check_time(1)
          2. target_call_timer_callback
          3. handle_target
          4. is_jtag_poll_safe
          5. sense_handler
          6. jtag_power_dropout
          7. jtag_srst_asserted
          8. target_poll
          9. target->type->poll
          10. andes_v3_poll
          11. andes_v3_debug_entry
          12. target_call_event_callbacks(TARGET_EVENT_HALTED)
          13. target_call_event_callbacks(TARGET_EVENT_GDB_HALT)
          14. target_handle_event
          15. callback->callback
          16. gdb_target_callback_event_handler
          17. target_handle_event
          18. gdb_frontend_halted
          19. log_remove_callback
          20. gdb_last_signal
          21. rtos_update_threads
          22. target_handle_event
          23. callback->callback
          24. gdb_target_callback_event_handler
          25. target_handle_event
          26. target_call_event_callbacks(TARGET_EVENT_GDB_END)
          27. target_handle_event
          28. callback->callback
          29. gdb_target_callback_event_handler
          30. target_call_event_callbacks(TARGET_EVENT_GDB_HALT)
      7. server_quit
    7. unregister_all_commands
    8. command_done
    9. adapter_quit
      1. jtag->quit()