Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libcpu/arm/cortex-m3/cpuport.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,14 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
extern long list_thread(void);
#endif
struct stack_frame* context = &exception_info->stack_frame;
struct exception_stack_frame *exception_stack = &exception_info->stack_frame.exception_stack_frame;
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change appears to be a breaking API change for rt_exception_hook. The hook function signature may need to be updated to accept struct exception_stack_frame* instead of struct exception_info*, and all existing hook implementations will need to be updated accordingly.

Copilot uses AI. Check for mistakes.
struct stack_frame *context = &exception_info->stack_frame;

if (rt_exception_hook != RT_NULL)
{
rt_err_t result;

result = rt_exception_hook(exception_info);
result = rt_exception_hook(exception_stack);
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The variable name 'exception_stack' is potentially confusing since it's actually a pointer to an exception_stack_frame structure, not a stack itself. Consider renaming to 'exception_frame' or 'stack_frame' for clarity.

Copilot uses AI. Check for mistakes.
if (result == RT_EOK)
return;
}
Expand Down
Loading