mirror of
https://github.com/apache/nuttx.git
synced 2026-09-03 15:43:01 +00:00
Avoid hard fault when reading vectors in text section.
This commit is contained in:
parent
90f8315432
commit
8f297f79d8
1 changed files with 7 additions and 5 deletions
|
|
@ -77,11 +77,6 @@ static bool in_code_region(unsigned long pc)
|
|||
{
|
||||
int i = 0;
|
||||
|
||||
if (pc >= (unsigned long)_START_TEXT && pc < (unsigned long)_END_TEXT)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (g_backtrace_code_regions)
|
||||
{
|
||||
while (g_backtrace_code_regions[i] &&
|
||||
|
|
@ -98,6 +93,13 @@ static bool in_code_region(unsigned long pc)
|
|||
}
|
||||
}
|
||||
|
||||
/* When g_backtrace_code_regions is null, try to use all the text section */
|
||||
|
||||
else if (pc >= (unsigned long)_START_TEXT && pc < (unsigned long)_END_TEXT)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue