View | Details | Raw Unified | Return to bug 191260
Collapse All | Expand All

(-)sys/cddl/dev/dtrace/amd64/dtrace_isa.c (-11 / +9 lines)
Lines 349-355 Link Here
349
	for (i = 1; i <= aframes; i++) {
349
	for (i = 1; i <= aframes; i++) {
350
		fp = fp->f_frame;
350
		fp = fp->f_frame;
351
351
352
		if (fp->f_retaddr == (long)dtrace_invop_callsite) {
352
		if (P2ROUNDUP(fp->f_retaddr,16) == (long)dtrace_invop_callsite) {
353
			/*
353
			/*
354
			 * In the case of amd64, we will use the pointer to the
354
			 * In the case of amd64, we will use the pointer to the
355
			 * regs structure that was pushed when we took the
355
			 * regs structure that was pushed when we took the
Lines 363-395 Link Here
363
			 * we're seeking is passed in regsiters, we can just
363
			 * we're seeking is passed in regsiters, we can just
364
			 * load it directly.
364
			 * load it directly.
365
			 */
365
			 */
366
			struct reg *rp = (struct reg *)((uintptr_t)&fp[1] +
366
			struct trapframe *tp = (struct trapframe *)((uintptr_t)&fp[1]); 
367
			    sizeof (uintptr_t));
368
367
369
			if (arg <= inreg) {
368
			if (arg <= inreg) {
370
				switch (arg) {
369
				switch (arg) {
371
				case 0:
370
				case 0:
372
					stack = (uintptr_t *)&rp->r_rdi;
371
					stack = (uintptr_t *)&tp->tf_rdi;
373
					break;
372
					break;
374
				case 1:
373
				case 1:
375
					stack = (uintptr_t *)&rp->r_rsi;
374
					stack = (uintptr_t *)&tp->tf_rsi;
376
					break;
375
					break;
377
				case 2:
376
				case 2:
378
					stack = (uintptr_t *)&rp->r_rdx;
377
					stack = (uintptr_t *)&tp->tf_rdx;
379
					break;
378
					break;
380
				case 3:
379
				case 3:
381
					stack = (uintptr_t *)&rp->r_rcx;
380
					stack = (uintptr_t *)&tp->tf_rcx;
382
					break;
381
					break;
383
				case 4:
382
				case 4:
384
					stack = (uintptr_t *)&rp->r_r8;
383
					stack = (uintptr_t *)&tp->tf_r8;
385
					break;
384
					break;
386
				case 5:
385
				case 5:
387
					stack = (uintptr_t *)&rp->r_r9;
386
					stack = (uintptr_t *)&tp->tf_r9;
388
					break;
387
					break;
389
				}
388
				}
390
				arg = 0;
389
				arg = 0;
391
			} else {
390
			} else {
392
				stack = (uintptr_t *)(rp->r_rsp);
391
				stack = (uintptr_t *)(tp->tf_rsp);
393
				arg -= inreg;
392
				arg -= inreg;
394
			}
393
			}
395
			goto load;
394
			goto load;
Lines 426-432 Link Here
426
	DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
425
	DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
427
426
428
	return (val);
427
	return (val);
429
	return (0);
430
}
428
}

Return to bug 191260