winIDEA SDK
isys::CSessionCtrl Class Reference

Description

This class provides debug session function.

#include <CSessionCtrl.h>

Inherits isys::CSessionBaseCtrl, and std::enable_shared_from_this< CSessionCtrl >.

Public Member Functions

void begin_program ()
 Begins new debug session, starts emulation (HAR) on all SoCs and programs them. More...
 
void begin_reset ()
 Begins new debug session, starts emulation (HAR) on all SoCs. More...
 
void begin_attach ()
 Begins new debug session, attaches to all SoCs configured to attach on begin. More...
 
void begin_prepare ()
 Begins session, does not attach to any SoC. More...
 
void end ()
 Ends debug session (detaches from all SoCs). More...
 
SPSessionStatus get_status ()
 Returns session state. More...
 
SPSessionTopology get_topology ()
 Returns session topology - attached SoCs and processes. More...
 
std::vector< SPSessionTopology_CoreBinding > get_core_SMP_bindings (uint32_t dwSoCIndex=0) const
 returns a union of SMPs and non-SMP bound cores binding for a non-SMP core will use the name of the core and only reference its core index
 
SPConnectionMgr instance_attach (const std::string &strName)
 Returns a connection manager for the specified instance, possibly launching a new winIDEA instance. More...
 
SPConnectionMgr instance_attach (uint32_t dwCoreIndex)
 Returns a connection manager for the specified instance, possibly launching a new winIDEA instance. More...
 
bool instance_is_attached (uint32_t dwCoreIndex) const
 Returns true if the winIDEA instance controlling dwCoreIndex is attached. More...
 
std::string process_attach ()
 Attaches to the specified process. More...
 
void process_focus (const std::string &strProcessURL)
 Focuses the specified process. More...
 
SPProcessCtrl get_process (const std::string &strProcessURL)
 Returns CProcessCtrl for the specified process. More...
 
SPSoCCtrl get_SoC (const std::string &strSoC)
 Returns CSoCCtrl for the specified SoC. More...
 
SPTerminalCtrl get_terminal (std::string strConfiguration="")
 Returns CTerminalCtrl for the specified terminal configuration. More...
 

Member Function Documentation

◆ begin_attach()

void isys::CSessionCtrl::begin_attach ( )

Begins new debug session, attaches to all SoCs configured to attach on begin.

In other words, connects to an already running target.

Exceptions
TExceptionif session initialization fails.

Python example: test_get_process.py

◆ begin_prepare()

void isys::CSessionCtrl::begin_prepare ( )

Begins session, does not attach to any SoC.

In other words, init DarkBlue Box and debug session, but stop just before accessing the target.

Exceptions
TExceptionif session initialization fails.

Python example: test_begin_prepare.py

◆ begin_program()

void isys::CSessionCtrl::begin_program ( )

Begins new debug session, starts emulation (HAR) on all SoCs and programs them.

In other words, downloads code to target and stops on reset vector.

Exceptions
TExceptionif session initialization fails.

Python example: test_begin_program.py

◆ begin_reset()

void isys::CSessionCtrl::begin_reset ( )

Begins new debug session, starts emulation (HAR) on all SoCs.

In other words, resets target and stops on reset vector. No programming is done.

Exceptions
TExceptionif session initialization fails.

Python example: test_soc_ctrl_attach.py

◆ end()

void isys::CSessionCtrl::end ( )

Ends debug session (detaches from all SoCs).

Python example: test_begin_prepare.py

◆ get_process()

SPProcessCtrl isys::CSessionCtrl::get_process ( const std::string &  strProcessURL)

Returns CProcessCtrl for the specified process.

Parameters
strProcessURLURL of the process to return
Exceptions
TExceptionif operation fails.

Python example: test_get_process.py

◆ get_SoC()

SPSoCCtrl isys::CSessionCtrl::get_SoC ( const std::string &  strSoC)

Returns CSoCCtrl for the specified SoC.

The session must be active (started with one of begin_ calls).

Parameters
strSoCname (as configured in winIDEA) of the SoC to return. IF a single SoC is used, this string may be empty
Exceptions
TExceptionif operation fails.

Python example: test_get_soc.py

◆ get_status()

SPSessionStatus isys::CSessionCtrl::get_status ( )

Returns session state.

Exceptions
TExceptionif status cannot be obtained.

◆ get_terminal()

SPTerminalCtrl isys::CSessionCtrl::get_terminal ( std::string  strConfiguration = "")

Returns CTerminalCtrl for the specified terminal configuration.

Parameters
strConfigurationname of terminal configuration, empty string uses the first/default
Exceptions
TExceptionif operation fails.

Python example: test_get_terminal.py

◆ get_topology()

SPSessionTopology isys::CSessionCtrl::get_topology ( )

Returns session topology - attached SoCs and processes.

Exceptions
TExceptionif topology cannot be obtained.

Python example: test_get_topology.py

◆ instance_attach() [1/2]

SPConnectionMgr isys::CSessionCtrl::instance_attach ( const std::string &  strName)

Returns a connection manager for the specified instance, possibly launching a new winIDEA instance.

Parameters
strNamename of the instance - as given in SPSessionTopology_CoreBinding
Exceptions
TExceptionif invalid instance

◆ instance_attach() [2/2]

SPConnectionMgr isys::CSessionCtrl::instance_attach ( uint32_t  dwCoreIndex)

Returns a connection manager for the specified instance, possibly launching a new winIDEA instance.

Parameters
dwCoreIndexthe core index
Exceptions
TExceptionif invalid instance

◆ instance_is_attached()

bool isys::CSessionCtrl::instance_is_attached ( uint32_t  dwCoreIndex) const

Returns true if the winIDEA instance controlling dwCoreIndex is attached.

Parameters
dwCoreIndexthe core index

◆ process_attach()

std::string isys::CSessionCtrl::process_attach ( )

Attaches to the specified process.

Loads its symbol files, creates working image

Returns
process URL
Exceptions
TExceptionif operation fails.

Python example: test_process_attach.py

◆ process_focus()

void isys::CSessionCtrl::process_focus ( const std::string &  strProcessURL)

Focuses the specified process.

Parameters
strProcessURLURL of the process to focus
Exceptions
TExceptionif operation fails.

Python example: test_process_focus.py