vm: fix potential null deref
[minix.git] / commands / mdb / proto.h
blobabdd0f857643bb964b69ca2aeaa517c55593ccc0
1 /*
2 * proto.h for mdb
3 */
5 /* core.c */
7 void prtmap(void);
8 unsigned long core_init(char *filename);
9 unsigned long file_init(char *filename);
10 long read_core(int req, long addr, long data);
12 /* mdb.c */
14 void mdb_error(char *s);
15 long breakpt(long addr , char *cmd );
16 void tstart(int req , int verbose , int val , int cnt );
18 /* io.c */
20 char *get_cmd(char *cbuf, int csize);
21 void openin(char *s );
22 void logging(int c, char *name);
23 void do_error(char *message);
24 int Printf(const char *format, ...);
25 void outbyte(int byte);
26 void outcomma(void);
27 void outh8(unsigned num);
28 void outh16(unsigned num);
29 void outh32(unsigned num);
30 void outh4(unsigned num);
31 void outspace(void);
32 void outstr(char *s);
33 void outtab(void);
34 void outustr(char *s);
35 void closestring(void);
36 int mytolower(int ch);
37 void openstring(char *string);
38 int stringpos(void);
39 int stringtab(void);
41 /* mdbdis86.c */
43 long dasm(long addr, int count, int symflg);
45 /* mdbexp.c */
47 char *getexp(char *buf, long *exp_p, int *seg_p);
48 char *skip(char *s);
50 /* kernel.c */
51 long get_reg(int pid, long k);
52 void set_reg(int pid, long k, long value);
53 long reg_addr(char *s);
54 int disp_regs(void);
55 int outsegreg(off_t num);
56 void update(void);
57 void disp_maps(void);
59 /* misc.c */
61 void dump_stack(long count);
62 off_t file_size(int fd);
63 void help_on(int h);
64 void version_info(void);
65 void help_page(void);
67 #if EXTRA_SYMBOLS
68 /* gnu_sym.c */
69 void gnu_init(char *filename);
70 long gnu_symbolvalue(char *name, int is_text );
71 void gnu_symbolic(off_t value, int separator);
72 void gnu_listsym(int tchar);
73 int gnu_text_symbol(off_t value);
74 int gnu_finds_pc(off_t pc);
75 int gnu_finds_data(off_t off, int data_seg);
76 #endif /* EXTRA_SYMBOLS */
78 /* sym.c */
79 void syminit(char *filename);
80 long symbolvalue(char *name, int is_text );
81 void printhex(off_t v);
82 void symbolic(off_t value, int separator);
83 void listsym(char *cmd);
84 int text_symbol(off_t value);
85 int finds_pc(off_t pc);
86 int finds_data(off_t off, int data_seg);
88 /* trace.c */
89 long mdbtrace(int req, int pid, long addr, long data);
90 u32_t peek_dword(off_t addr);
92 #if SYSCALLS_SUPPORT
94 /* syscalls.c */
95 void start_syscall(long addr);
96 void do_syscall(long addr);
98 /* decode.c */
99 void decode_message(unsigned addr);
100 void decode_result(void);
102 /* ioctl.c */
103 void decode_ioctl(int sr, message *m);
105 #endif /* SYSCALLS_SUPPORT */