Lines Matching refs:th

24 #define VM_CFP_CNT(th, cfp) \
25 ((rb_control_frame_t *)((th)->stack + (th)->stack_size) - (rb_control_frame_t *)(cfp))
28 control_frame_dump(rb_thread_t *th, rb_control_frame_t *cfp)
31 ptrdiff_t ep = cfp->ep - th->stack;
43 if (ep < 0 || (size_t)ep > th->stack_size) {
112 ((rb_control_frame_t *)(th->stack + th->stack_size) - cfp));
119 fprintf(stderr, "s:%04"PRIdPTRDIFF" ", cfp->sp - th->stack);
138 rb_vmdebug_stack_dump_raw(rb_thread_t *th, rb_control_frame_t *cfp)
145 for (p = st = th->stack; p < sp; p++) {
149 if (th->stack <= t && t < sp) {
150 fprintf(stderr, " (= %ld)", (long)((VALUE *)GC_GUARDED_PTR_REF(t) - th->stack));
162 while ((void *)cfp < (void *)(th->stack + th->stack_size)) {
163 control_frame_dump(th, cfp);
172 rb_thread_t *th = GET_THREAD();
173 rb_vmdebug_stack_dump_raw(th, th->cfp);
219 rb_thread_t *th;
220 GetThreadPtr(thval, th);
221 rb_vmdebug_stack_dump_raw(th, th->cfp);
240 vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
283 control_frame_dump(th, cfp);
305 (ptr - th->stack));
309 if ((th)->stack + (th)->stack_size > (VALUE *)(cfp + 1)) {
310 vm_stack_dump_each(th, cfp + 1);
323 rb_vmdebug_debug_print_register(rb_thread_t *th)
325 rb_control_frame_t *cfp = th->cfp;
327 ptrdiff_t ep = cfp->ep - th->stack;
334 if (ep < 0 || (size_t)ep > th->stack_size) {
338 cfpi = ((rb_control_frame_t *)(th->stack + th->stack_size)) - cfp;
340 pc, (cfp->sp - th->stack), ep, cfpi);
346 rb_thread_t *th;
347 GetThreadPtr(thval, th);
348 rb_vmdebug_debug_print_register(th);
352 rb_vmdebug_debug_print_pre(rb_thread_t *th, rb_control_frame_t *cfp)
361 for (i=0; i<(int)VM_CFP_CNT(th, cfp); i++) {
365 /* printf("%3"PRIdPTRDIFF" ", VM_CFP_CNT(th, cfp)); */
373 rb_vmdebug_debug_print_register(th);
378 rb_vmdebug_debug_print_post(rb_thread_t *th, rb_control_frame_t *cfp
390 rb_vmdebug_debug_print_register(th);
392 /* stack_dump_raw(th, cfp); */
395 /* stack_dump_thobj(th); */
396 vm_stack_dump_each(th, th->cfp);
415 rb_thread_t *th;
417 GetThreadPtr(self, th);
418 cfp = th->cfp;
514 HANDLE th;
530 th = pOpenThread(THREAD_SUSPEND_RESUME|THREAD_GET_CONTEXT, FALSE, tid);
531 if (th) {
532 if (SuspendThread(th) != (DWORD)-1) {
536 if (GetThreadContext(th, &context)) {
569 while (pStackWalk64(mac, ph, th, &frame, &context, NULL,
598 ResumeThread(th);
600 CloseHandle(th);
663 HANDLE th = (HANDLE)_beginthread(dump_thread, 0, &tid);
664 if (th != (HANDLE)-1)
665 WaitForSingleObject(th, INFINITE);