mirror of
https://github.com/apache/nuttx.git
synced 2026-09-25 01:07:40 +08:00
Avoid hard fault when reading vectors in text section.
This commit is contained in:
committed by
Petro Karashchenko
parent
90f8315432
commit
8f297f79d8
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user