You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/02/15 13:32:57 UTC

[GitHub] [incubator-nuttx] michi-jung opened a new pull request #5505: Fix JLinkGDBServer crash attaching to target

michi-jung opened a new pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505


   If attaching to a target that is already running JLinkGDBServer calls
   RTOS_GetNumThreads() without a prior call to RTOS_UpdateThreads().  So
   do this within RTOS_GetNumThreads() if g_plugin_priv.ntcb has not yet
   been initialized.
   
   Note: If after attaching the debugger to the target, the target is
   resumed and then stopped again, the RTOS_UpdateThreads is actually
   called.  Thus, we are not running on stale thread data in this case.
   
   I also changed PLUGIN_VER to API_VER and its value to 101, as
   RTOS_GetVersion() does not query the version of the plugin, but the API
   version implemented by the plugin, which in our case is 1.1.
   
   Signed-off-by: Michael Jung <mi...@gmx.net>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5505: Fix JLinkGDBServer crash attaching to target

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5505: Fix JLinkGDBServer crash attaching to target

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5505: Fix JLinkGDBServer crash attaching to target

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505#discussion_r806858785



##########
File path: tools/jlink-nuttx.c
##########
@@ -424,6 +449,11 @@ struct symbols_s *RTOS_GetSymbols(void)
 
 uint32_t RTOS_GetNumThreads(void)
 {
+  if (!g_plugin_priv.ntcb)

Review comment:
       ```suggestion
     if (g_plugin_priv.ntcb > 0)
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5505: Fix JLinkGDBServer crash attaching to target

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505#discussion_r806886796



##########
File path: tools/jlink-nuttx.c
##########
@@ -424,6 +449,11 @@ struct symbols_s *RTOS_GetSymbols(void)
 
 uint32_t RTOS_GetNumThreads(void)
 {
+  if (!g_plugin_priv.ntcb)

Review comment:
       Yes. I made a mistake. Thank you for taking care.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5505: Fix JLinkGDBServer crash attaching to target

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505#discussion_r806858785



##########
File path: tools/jlink-nuttx.c
##########
@@ -424,6 +449,11 @@ struct symbols_s *RTOS_GetSymbols(void)
 
 uint32_t RTOS_GetNumThreads(void)
 {
+  if (!g_plugin_priv.ntcb)

Review comment:
       ```suggestion
     if (g_plugin_priv.ntcb > 0)
   ```

##########
File path: tools/jlink-nuttx.c
##########
@@ -424,6 +449,11 @@ struct symbols_s *RTOS_GetSymbols(void)
 
 uint32_t RTOS_GetNumThreads(void)
 {
+  if (!g_plugin_priv.ntcb)

Review comment:
       Yes. I made a mistake. Thank you for taking care.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] michi-jung commented on a change in pull request #5505: Fix JLinkGDBServer crash attaching to target

Posted by GitBox <gi...@apache.org>.
michi-jung commented on a change in pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505#discussion_r806862156



##########
File path: tools/jlink-nuttx.c
##########
@@ -424,6 +449,11 @@ struct symbols_s *RTOS_GetSymbols(void)
 
 uint32_t RTOS_GetNumThreads(void)
 {
+  if (!g_plugin_priv.ntcb)

Review comment:
       Ok, did this (though it must be ntcb == 0, not ntct > 0).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] michi-jung commented on a change in pull request #5505: Fix JLinkGDBServer crash attaching to target

Posted by GitBox <gi...@apache.org>.
michi-jung commented on a change in pull request #5505:
URL: https://github.com/apache/incubator-nuttx/pull/5505#discussion_r806862156



##########
File path: tools/jlink-nuttx.c
##########
@@ -424,6 +449,11 @@ struct symbols_s *RTOS_GetSymbols(void)
 
 uint32_t RTOS_GetNumThreads(void)
 {
+  if (!g_plugin_priv.ntcb)

Review comment:
       Ok, did this (though it must be ntcb == 0, not ntct > 0).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org