db_examine.c (283088) | db_examine.c (283248) |
---|---|
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 --- 15 unchanged lines hidden (view full) --- 24 * rights to redistribute these changes. 25 */ 26/* 27 * Author: David B. Golub, Carnegie Mellon University 28 * Date: 7/90 29 */ 30 31#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 --- 15 unchanged lines hidden (view full) --- 24 * rights to redistribute these changes. 25 */ 26/* 27 * Author: David B. Golub, Carnegie Mellon University 28 * Date: 7/90 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/ddb/db_examine.c 283088 2015-05-18 22:27:46Z pfg $"); | 32__FBSDID("$FreeBSD: head/sys/ddb/db_examine.c 283248 2015-05-21 15:16:18Z pfg $"); |
33 34#include <sys/param.h> 35#include <sys/systm.h> 36 37#include <ddb/ddb.h> 38 39#include <ddb/db_lex.h> 40#include <ddb/db_output.h> --- 6 unchanged lines hidden (view full) --- 47static void db_examine(db_addr_t, char *, int); 48static void db_search(db_addr_t, int, db_expr_t, db_expr_t, u_int); 49 50/* 51 * Examine (print) data. 52 */ 53/*ARGSUSED*/ 54void | 33 34#include <sys/param.h> 35#include <sys/systm.h> 36 37#include <ddb/ddb.h> 38 39#include <ddb/db_lex.h> 40#include <ddb/db_output.h> --- 6 unchanged lines hidden (view full) --- 47static void db_examine(db_addr_t, char *, int); 48static void db_search(db_addr_t, int, db_expr_t, db_expr_t, u_int); 49 50/* 51 * Examine (print) data. 52 */ 53/*ARGSUSED*/ 54void |
55db_examine_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, 56 char *modif) | 55db_examine_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) |
57{ 58 if (modif[0] != '\0') 59 db_strcpy(db_examine_format, modif); 60 61 if (count == -1) 62 count = 1; 63 64 db_examine((db_addr_t) addr, db_examine_format, count); --- 120 unchanged lines hidden (view full) --- 185 186/* 187 * Print value. 188 */ 189static char db_print_format = 'x'; 190 191/*ARGSUSED*/ 192void | 56{ 57 if (modif[0] != '\0') 58 db_strcpy(db_examine_format, modif); 59 60 if (count == -1) 61 count = 1; 62 63 db_examine((db_addr_t) addr, db_examine_format, count); --- 120 unchanged lines hidden (view full) --- 184 185/* 186 * Print value. 187 */ 188static char db_print_format = 'x'; 189 190/*ARGSUSED*/ 191void |
193db_print_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, 194 char *modif) | 192db_print_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) |
195{ 196 db_expr_t value; 197 198 if (modif[0] != '\0') 199 db_print_format = modif[0]; 200 201 switch (db_print_format) { 202 case 'a': --- 36 unchanged lines hidden (view full) --- 239 (void) db_disasm(loc, true); 240} 241 242/* 243 * Search for a value in memory. 244 * Syntax: search [/bhl] addr value [mask] [,count] 245 */ 246void | 193{ 194 db_expr_t value; 195 196 if (modif[0] != '\0') 197 db_print_format = modif[0]; 198 199 switch (db_print_format) { 200 case 'a': --- 36 unchanged lines hidden (view full) --- 237 (void) db_disasm(loc, true); 238} 239 240/* 241 * Search for a value in memory. 242 * Syntax: search [/bhl] addr value [mask] [,count] 243 */ 244void |
247db_search_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, 248 char *dummy4) | 245db_search_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) |
249{ 250 int t; 251 db_addr_t addr; 252 int size; 253 db_expr_t value; 254 db_expr_t mask; 255 db_expr_t count; 256 --- 66 unchanged lines hidden --- | 246{ 247 int t; 248 db_addr_t addr; 249 int size; 250 db_expr_t value; 251 db_expr_t mask; 252 db_expr_t count; 253 --- 66 unchanged lines hidden --- |