Deleted Added
full compact
db_trace.c (37679) db_trace.c (43309)
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

--- 9 unchanged lines hidden (view full) ---

18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
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 *
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

--- 9 unchanged lines hidden (view full) ---

18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
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 * $Id: db_trace.c,v 1.30 1998/07/08 10:53:58 bde Exp $
26 * $Id: db_trace.c,v 1.31 1998/07/15 11:27:11 bde Exp $
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31
32#include <machine/cpu.h>
33
34#include <vm/vm.h>

--- 43 unchanged lines hidden (view full) ---

78
79#define NORMAL 0
80#define TRAP 1
81#define INTERRUPT 2
82#define SYSCALL 3
83
84static void db_nextframe __P((struct i386_frame **, db_addr_t *));
85static int db_numargs __P((struct i386_frame *));
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31
32#include <machine/cpu.h>
33
34#include <vm/vm.h>

--- 43 unchanged lines hidden (view full) ---

78
79#define NORMAL 0
80#define TRAP 1
81#define INTERRUPT 2
82#define SYSCALL 3
83
84static void db_nextframe __P((struct i386_frame **, db_addr_t *));
85static int db_numargs __P((struct i386_frame *));
86static void db_print_stack_entry __P((char *, int, char **, int *, db_addr_t));
86static void db_print_stack_entry __P((const char *, int, char **, int *, db_addr_t));
87
88/*
89 * Figure out how many arguments were passed into the frame at "fp".
90 */
91static int
92db_numargs(fp)
93 struct i386_frame *fp;
94{

--- 18 unchanged lines hidden (view full) ---

113 else
114 args = 5;
115 }
116 return (args);
117}
118
119static void
120db_print_stack_entry(name, narg, argnp, argp, callpc)
87
88/*
89 * Figure out how many arguments were passed into the frame at "fp".
90 */
91static int
92db_numargs(fp)
93 struct i386_frame *fp;
94{

--- 18 unchanged lines hidden (view full) ---

113 else
114 args = 5;
115 }
116 return (args);
117}
118
119static void
120db_print_stack_entry(name, narg, argnp, argp, callpc)
121 char *name;
121 const char *name;
122 int narg;
123 char **argnp;
124 int *argp;
125 db_addr_t callpc;
126{
127 db_printf("%s(", name);
128 while (narg) {
129 if (argnp)

--- 15 unchanged lines hidden (view full) ---

145db_nextframe(fp, ip)
146 struct i386_frame **fp; /* in/out */
147 db_addr_t *ip; /* out */
148{
149 struct trapframe *tf;
150 int frame_type;
151 int eip, esp, ebp;
152 db_expr_t offset;
122 int narg;
123 char **argnp;
124 int *argp;
125 db_addr_t callpc;
126{
127 db_printf("%s(", name);
128 while (narg) {
129 if (argnp)

--- 15 unchanged lines hidden (view full) ---

145db_nextframe(fp, ip)
146 struct i386_frame **fp; /* in/out */
147 db_addr_t *ip; /* out */
148{
149 struct trapframe *tf;
150 int frame_type;
151 int eip, esp, ebp;
152 db_expr_t offset;
153 char *sym, *name;
153 const char *sym, *name;
154
155 eip = db_get_value((int) &(*fp)->f_retaddr, 4, FALSE);
156 ebp = db_get_value((int) &(*fp)->f_frame, 4, FALSE);
157
158 /*
159 * Figure out frame type.
160 */
161

--- 90 unchanged lines hidden (view full) ---

252 frame = (struct i386_frame *)addr;
253 callpc = (db_addr_t)db_get_value((int)&frame->f_retaddr, 4, FALSE);
254 }
255
256 first = TRUE;
257 while (count--) {
258 struct i386_frame *actframe;
259 int narg;
154
155 eip = db_get_value((int) &(*fp)->f_retaddr, 4, FALSE);
156 ebp = db_get_value((int) &(*fp)->f_frame, 4, FALSE);
157
158 /*
159 * Figure out frame type.
160 */
161

--- 90 unchanged lines hidden (view full) ---

252 frame = (struct i386_frame *)addr;
253 callpc = (db_addr_t)db_get_value((int)&frame->f_retaddr, 4, FALSE);
254 }
255
256 first = TRUE;
257 while (count--) {
258 struct i386_frame *actframe;
259 int narg;
260 char * name;
260 const char * name;
261 db_expr_t offset;
261 db_expr_t offset;
262 db_sym_t sym;
262 c_db_sym_t sym;
263#define MAXNARG 16
264 char *argnames[MAXNARG], **argnp = NULL;
265
266 sym = db_search_symbol(callpc, DB_STGY_ANY, &offset);
267 db_symbol_values(sym, &name, NULL);
268
269 /*
270 * Attempt to determine a (possibly fake) frame that gives

--- 68 unchanged lines hidden ---
263#define MAXNARG 16
264 char *argnames[MAXNARG], **argnp = NULL;
265
266 sym = db_search_symbol(callpc, DB_STGY_ANY, &offset);
267 db_symbol_values(sym, &name, NULL);
268
269 /*
270 * Attempt to determine a (possibly fake) frame that gives

--- 68 unchanged lines hidden ---