fix (stack-tracing): added rip memory region check for process resolving
This commit is contained in:
parent
3d0aedeeca
commit
ed490817e2
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "mm/stack.h"
|
||||
#include "mm/region.h"
|
||||
#include "utils/logger.h"
|
||||
#include "proc/scheduler.h"
|
||||
|
||||
|
@ -31,7 +32,7 @@ void stack_dump_call_info(uint64_t rip, symbol_T* symbol) {
|
|||
|
||||
void stack_trace_call_stack(uint64_t rbp) {
|
||||
uint64_t rip = ((uint64_t*)rbp)[1];
|
||||
process_T* process = scheduler_get_current_process();
|
||||
process_T* process = rip >= MEM_REGION_KERNEL ? scheduler_get_process(PROCESS_KERNEL) : scheduler_get_current_process();
|
||||
if (process == NULL) {
|
||||
log(LOG_NONE, " 0x%x -> <failed to resolve symbol> (process NULL reference)", rip);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue