Stepping over C++ exception not working as expected

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Stepping over C++ exception not working as expected

719 次查看
houe
Contributor II

When debugging code that throws an exception I am unable to step over the throw statement. Using any of the stepping actions (i.e. step into or step over) results in the same effect as just pressing resume. The code is executing correctly and program flow happens as I expect - I'm just not able to step over the throw statements! The only way I can get by is step another break point after the exception code and then continue to step.

Here is the code I used to test inside main() after the BOARD_ calls:

try {
throw std::runtime_error("test");
} catch (std::runtime_error &e) {
std::cout << e.what() << "\n";
}

Anyone else experiencing this? Any ideas what is wrong?

Thanks.

0 项奖励
3 回复数

634 次查看
houe
Contributor II

Sorry I should have mentioned those details. I'm using RT1020, mcuxpresso, and a segger j-link ultra+.

0 项奖励

634 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi michael boyko

   Please create your question in the MCUXPresso IDE area again:

   MCUXpresso IDE 

   And also post some C++ debug result screenshot.

   Then the IDE expert will help you to analysis it.

   I don't know why you choose C++, all the RT sdk driver is based on C code, so, it's better to use the C code for RT.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

634 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi michael boyko ,

  Which IDE, RT chip partnumber, debugger you are using now?

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励