db_trace.c (140401) | db_trace.c (148666) |
---|---|
1/*- 2 * Mach Operating System 3 * Copyright (c) 1991,1990 Carnegie Mellon University 4 * All Rights Reserved. 5 * 6 * Permission to use, copy, modify and distribute this software and its 7 * documentation is hereby granted, provided that both the copyright 8 * notice and this permission notice appear in all copies of the --- 11 unchanged lines hidden (view full) --- 20 * Carnegie Mellon University 21 * Pittsburgh PA 15213-3890 22 * 23 * any improvements or extensions that they make and grant Carnegie the 24 * rights to redistribute these changes. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Mach Operating System 3 * Copyright (c) 1991,1990 Carnegie Mellon University 4 * All Rights Reserved. 5 * 6 * Permission to use, copy, modify and distribute this software and its 7 * documentation is hereby granted, provided that both the copyright 8 * notice and this permission notice appear in all copies of the --- 11 unchanged lines hidden (view full) --- 20 * Carnegie Mellon University 21 * Pittsburgh PA 15213-3890 22 * 23 * any improvements or extensions that they make and grant Carnegie the 24 * rights to redistribute these changes. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/i386/i386/db_trace.c 140401 2005-01-18 03:48:02Z jhb $"); | 28__FBSDID("$FreeBSD: head/sys/i386/i386/db_trace.c 148666 2005-08-03 04:27:40Z jeff $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kdb.h> 33#include <sys/proc.h> | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kdb.h> 33#include <sys/proc.h> |
34#include <sys/stack.h> |
|
34#include <sys/sysent.h> 35 36#include <machine/cpu.h> 37#include <machine/md_var.h> 38#include <machine/pcb.h> 39#include <machine/reg.h> 40 41#include <vm/vm.h> --- 453 unchanged lines hidden (view full) --- 495{ 496 struct pcb *ctx; 497 498 ctx = kdb_thr_ctx(thr); 499 return (db_backtrace(thr, NULL, (struct i386_frame *)ctx->pcb_ebp, 500 ctx->pcb_eip, count)); 501} 502 | 35#include <sys/sysent.h> 36 37#include <machine/cpu.h> 38#include <machine/md_var.h> 39#include <machine/pcb.h> 40#include <machine/reg.h> 41 42#include <vm/vm.h> --- 453 unchanged lines hidden (view full) --- 496{ 497 struct pcb *ctx; 498 499 ctx = kdb_thr_ctx(thr); 500 return (db_backtrace(thr, NULL, (struct i386_frame *)ctx->pcb_ebp, 501 ctx->pcb_eip, count)); 502} 503 |
504void 505stack_save(struct stack *st) 506{ 507 struct i386_frame *frame; 508 vm_offset_t callpc; 509 register_t ebp; 510 511 stack_zero(st); 512 __asm __volatile("movl %%ebp,%0" : "=r" (ebp)); 513 frame = (struct i386_frame *)ebp; 514 while (1) { 515 if (!INKERNEL(frame)) 516 break; 517 callpc = frame->f_retaddr; 518 if (!INKERNEL(callpc)) 519 break; 520 if (stack_put(st, callpc) == -1) 521 break; 522 frame = frame->f_frame; 523 } 524} 525 |
|
503int 504i386_set_watch(watchnum, watchaddr, size, access, d) 505 int watchnum; 506 unsigned int watchaddr; 507 int size; 508 int access; 509 struct dbreg * d; 510{ --- 177 unchanged lines hidden --- | 526int 527i386_set_watch(watchnum, watchaddr, size, access, d) 528 int watchnum; 529 unsigned int watchaddr; 530 int size; 531 int access; 532 struct dbreg * d; 533{ --- 177 unchanged lines hidden --- |