Avoid hard fault when reading vectors in text section.
This commit is contained in:
parent
90f8315432
commit
8f297f79d8
@ -77,11 +77,6 @@ static bool in_code_region(unsigned long pc)
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (pc >= (unsigned long)_START_TEXT && pc < (unsigned long)_END_TEXT)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_backtrace_code_regions)
|
if (g_backtrace_code_regions)
|
||||||
{
|
{
|
||||||
while (g_backtrace_code_regions[i] &&
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user