Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2006 05:43:45 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 101833 for review
Message-ID:  <200607180543.k6I5hjBI007899@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101833

Change 101833 by jb@jb_freebsd2 on 2006/07/18 05:43:02

	IFC

Affected files ...

.. //depot/projects/dtrace/src/sys/sun4v/sun4v/db_trace.c#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/sun4v/sun4v/db_trace.c#2 (text+ko) ====

@@ -97,7 +97,7 @@
  * User stack trace (debugging aid).
  */
 static void
-db_utrace(struct thread *td, struct trapframe *tf, int count, int *quitp)
+db_utrace(struct thread *td, struct trapframe *tf, int count)
 {
 	struct pcb *pcb;
 	db_addr_t sp, rsp, o7, pc;
@@ -109,7 +109,7 @@
 	    FALSE);
 	pc = db_get_value((db_addr_t)&tf->tf_tpc, sizeof(tf->tf_tpc), FALSE);
 	db_printf("user trace: trap %%o7=%#lx\n", o7);
-	while (count-- && sp != 0 && !*quitp) {
+	while (count-- && sp != 0 && !db_pager_quit) {
 		db_printf("pc %#lx, sp %#lx\n", pc, sp);
 		/* First, check whether the frame is in the pcb. */
 		found = 0;
@@ -135,7 +135,7 @@
 }
 
 static int
-db_print_trap(struct thread *td, struct trapframe *tf, int count, int *quitp)
+db_print_trap(struct thread *td, struct trapframe *tf, int count)
 {
 	struct proc *p;
 	const char *symname;
@@ -226,7 +226,7 @@
 		db_printf("userland() at ");
 		db_printsym(tpc, DB_STGY_PROC);
 		db_printf("\n");
-		db_utrace(td, tf, count, quitp);
+		db_utrace(td, tf, count);
 	}
 	return (user);
 }
@@ -243,7 +243,6 @@
 	db_addr_t pc;
 	int trap;
 	int user;
-	int quit;
 
 	if (count == -1)
 		count = 1024;
@@ -251,9 +250,7 @@
 	trap = 0;
 	user = 0;
 	npc = 0;
-	quit = 0;
-	db_setup_paging(db_simple_pager, &quit, db_lines_per_page);
-	while (count-- && !user && !quit) {
+	while (count-- && !user && !db_pager_quit) {
 		pc = (db_addr_t)db_get_value((db_addr_t)&fp->fr_pc,
 		    sizeof(fp->fr_pc), FALSE);
 		if (trap) {
@@ -277,7 +274,7 @@
 			tf = (struct trapframe *)(fp + 1);
 			npc = db_get_value((db_addr_t)&tf->tf_tpc,
 			    sizeof(tf->tf_tpc), FALSE);
-			user = db_print_trap(td, tf, count, &quit);
+			user = db_print_trap(td, tf, count);
 			trap = 1;
 		} else {
 			db_printf("%s() at ", name);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607180543.k6I5hjBI007899>