|
|
1.1 root 1: /* Run this program straight. Then set a breakpoint in `dump',
2: run it again, and continue the program. Diff the outputs
3: and you will see what the supplied debugger does for a breakpoint. */
4:
5: int dump ();
6: int after_dump ();
7:
8: main ()
9: {
10: printf ("main = 0x%x\ndump = 0x%x\nend = 0x%x\n", main, dump, after_dump);
11:
12: dump (main, after_dump);
13: }
14:
15: int dump (p, q)
16: int *p;
17: int *q;
18: {
19: int cnt = 0;
20: printf ("dump: 0x%x-0x%x\n", p, q);
21:
22: while (p < q)
23: {
24: if ((cnt++ & 3) == 0)
25: printf ("\n0x%08x: ", p);
26: printf ("0x%08x ", *p++);
27: }
28: printf ("\n");
29: }
30:
31: after_dump ()
32: {
33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.