-#elif __arm__
- uint32_t i= 0;
- uint32_t frameb[2];
- uint32_t fp= 0;
-
- // get the current frame pointer for this thread
- __asm__ volatile("mov %0,r7" : "=r" (fp));
-
- // now crawl up the stack recording the link value of each frame
- do {
- // check bounds
- if ((fp == 0) || ((fp & 3) != 0) || (fp > VM_MAX_KERNEL_ADDRESS) || (fp < VM_MIN_KERNEL_ADDRESS)) {
- break;
- }
- // safely read frame
- if (copyinframe(fp, frameb) != 0) {
- break;
- }
-
- // No need to use copyin as this is always a kernel address, see check above
- bt[i] = (void*)frameb[1]; // link register
- fp = frameb[0];
- } while (++i < maxAddrs);
- frame= i;