Commit | Line | Data |
---|---|---|
89cfa821 C |
1 | |
2 | From Jeffrey Hsu on the port of mprof to the MIPS: | |
3 | Date: 8/90 | |
4 | ||
5 | mprof.c | |
6 | added some #includes for mips compiler stuff | |
7 | created global int variable intloc for use by assembly language routines | |
8 | mips traverses the stack differently | |
9 | call pdrinit in mprof_startup to read in symbol table | |
10 | used __Argv as alternative to making the application stash argv in some | |
11 | global somewhere | |
12 | dynamically set mp_root_address to an address between __start and main | |
13 | added routines pdrinit, getpdr, getretaddr to handle stack traces | |
14 | I assume the frame register is 29 and the return address is in 31. | |
15 | ||
16 | mpfilt.c | |
17 | pretty much the same code as mprof.c to read in the symbol table | |
18 | added code to read in structures and typedefs | |
19 | pretty hairy | |
20 | -> note: mpheader is a typedef not a structure | |
21 | mprof only screens out types, in mpf_intern_type | |
22 | so you may see a mpheader under the size 8 bin | |
23 | but you can fix that using the same mechanism in mpf_intern_typedef | |
24 | ||
25 | mprof.h | |
26 | define CRT0_ADDRESS to dummy value | |
27 | ||
28 | Makefile | |
29 | mostly like sun4 | |
30 | changed ASFLAGS to take out sun stuff | |
31 | changed the way the library was created | |
32 | Is there some reason for copying libc.a rather than creating a separate | |
33 | library? The user will have to change his command line in either case. | |
34 | ||
35 | md.s | |
36 | added routines to get reg 29 and 31 | |
37 | note: calling the routine to get reg 31 changes reg 31, | |
38 | so we're not really getting reg 31, but the pc at the time we | |
39 | call reg 31 | |
40 | all this is accounted for in the code | |
41 | ||
42 | mpattach.c | |
43 | added check for realloc w/ null pointer, not really mips specific | |
44 | advantages: some applications can now run w/o modification | |
45 | disadvantages: if you use this feature, the direct allocation table | |
46 | will show realloc as a caller of malloc and your leak table may | |
47 | have realloc as the last function to call malloc | |
48 | added mips to the #if check for redefining exit |