Forums - GetCurrentHWThreadNum() simulation API not working

1 post / 0 new
GetCurrentHWThreadNum() simulation API not working
ovexler
Join Date: 19 Apr 19
Posts: 2
Posted: Fri, 2019-06-28 01:58
I have implemented cosim.dll. 
I used AddMemWasReadCallback() to add some callback to monitor specific address. 
When my callback hit I wanted to use the ReadThreadRegister() to get the program counter (TH_REG_PC). 
The ReadThreadRegister() needs a thread ID. 
To do so I have used the GetCurrentHWThreadNum() to extract the thread ID. 
Unfortunately the function always returns 0 as the thread ID 
even though I know for sure that the thread ID is 1. 
I thought it was Windows issue so I have ported the code to Linux cosim.so 
just to see that I'm getting the same wrong results.

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.