2 * Copyright (c) 1983 Regents of the University of California.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that: (1) source distributions retain this entire copyright
7 * notice and comment, and (2) distributions including binaries display
8 * the following acknowledgement: ``This product includes software
9 * developed by the University of California, Berkeley and its contributors''
10 * in the documentation or other materials provided with the distribution
11 * and in all advertising materials mentioning features or use of this
12 * software. Neither the name of the University nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26 * opcode of the `callf' instruction
28 #define CALL (0xc0000000)
31 sparc_find_call (parent
, p_lowpc
, p_highpc
)
36 bfd_vma dest_pc
, delta
;
40 delta
= (bfd_vma
) core_text_space
- core_text_sect
->vma
;
42 if (core_text_space
== 0)
46 if (p_lowpc
< s_lowpc
)
50 if (p_highpc
> s_highpc
)
54 DBG (CALLDEBUG
, printf ("[find_call] %s: 0x%lx to 0x%lx\n",
55 parent
->name
, p_lowpc
, p_highpc
));
56 for (instr
= (unsigned int *) (((p_lowpc
+ delta
) + 3) &~ 3);
57 instr
< (unsigned int *) (p_highpc
+ delta
);
63 printf ("[find_call] 0x%lx: callf", (bfd_vma
) instr
- delta
));
65 * Regular pc relative addressing check that this is the
66 * address of a function.
68 dest_pc
= ((bfd_vma
) (instr
+ (*instr
& ~CALL
))) - delta
;
69 if (dest_pc
>= s_lowpc
&& dest_pc
<= s_highpc
)
71 child
= sym_lookup (&symtab
, dest_pc
);
73 printf ("\tdest_pc=0x%lx, (name=%s, addr=0x%lx)\n",
74 dest_pc
, child
->name
, child
->addr
));
75 if (child
->addr
== dest_pc
)
78 arc_add (parent
, child
, 0);
83 * Something funny going on.
85 DBG (CALLDEBUG
, printf ("\tbut it's a botch\n"));
This page took 0.035126 seconds and 4 git commands to generate.