Move common attention handling code from prelim in common linux
debug_session(.h/.cpp) files.
This common code could be shared to handle attention events for
prelim and xe driver based Eu Debug
Related-To: NEO-9673
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
When a thread is stopped due to potential page fault
we must check AIP against start IP to ensure it is not
a newly started thread accidentally caught by PF algorithm
Related-to: NEO-8617
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
- do not allocate state save area every time attention event
is handled
- keep allocated memory for subsequent events
- remove not needed DBEUG_BREAK
Related-To: NEO-8183
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- check threads with attention state before reading SR_IDENT
- memory read is costly, for threads already in stopped state
there is no need to read sr_ident and check thread state again
- single stepping one thread performance is substantially improved,
by the factor of 6x
Related-To: NEO-8183
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- when resume(all) is called - all threads' sr counter needs to be
verified. Reading state save area separately for all threads takes
longer than reading whole state save area once. State save area is
only read again if sr counter wasn't updated
- fail while reading state save area means threads might have completed
execution
- this fix optimizes time spent in resume(all), that may be called before
debugger detaches
Related-To: NEO-7897
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- reading state save area for every threads takes too long when all
application threads have completed and there are stale ATT events to
process
- on detach gdb seemed to be frozen waiting for ATT event to be handled
- fix is to read state save area once - and check SIP counter for every
thread in ATT bitmask
Related-To: NEO-7897
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- before marking interrupt request check exception reason. If there is
exception other than forced exception or forced external halt treat
thread as stopped and generate distinct event for it.
Related-To: NEO-7869
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
Single-stepping threads is based on resume() and THREAD_STOPPED events
To speed up single-stepping, stopped threads must be discovered
immediately after resume() is called.
This change is adding ATT scan and event generation in resume()
Related-To: NEO-7750
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- enable tile attach mode by default
- both root device and subdevice may be attached to
Related-To: NEO-7347
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- keep track of all loaded modules
- keep track of process entry/exit state
- restore valid events on attach
- acknowledge/clean events on detach
Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- ThreadId is preferred beacuse it uniquely identifies thread and is
not related to device topology
Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>