diff options
author | dim <dim@FreeBSD.org> | 2010-11-01 19:35:33 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-11-01 19:35:33 +0000 |
commit | 3f5c947f4453c6016a2a6a9636367ee3f48fc6fc (patch) | |
tree | 461aafc934d462eb9b9221308f8e25238c0ada62 /contrib/binutils/gprof/mips.c | |
parent | e6be3e7867eb43d220575baee2ce5662fb03e46c (diff) | |
parent | d0f678fa0ff3f08a4eca29daf4d1ac39797b6326 (diff) | |
download | FreeBSD-src-3f5c947f4453c6016a2a6a9636367ee3f48fc6fc.zip FreeBSD-src-3f5c947f4453c6016a2a6a9636367ee3f48fc6fc.tar.gz |
Merge ^/vendor/binutils/dist@214571 into contrib/binutils, which brings
us up to version 2.17.50.20070703, at the last GPLv2 commit.
Amongst others, this added upstream support for some FreeBSD-specific
things that we previously had to manually hack in, such as the OSABI
label support, and so on.
There are also quite a number of new files, some for cpu's (e.g. SPU)
that we may or may not be interested in, but those can be cleaned up
later on, if needed.
Diffstat (limited to 'contrib/binutils/gprof/mips.c')
-rw-r--r-- | contrib/binutils/gprof/mips.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/contrib/binutils/gprof/mips.c b/contrib/binutils/gprof/mips.c index 96d2707..7a7344d 100644 --- a/contrib/binutils/gprof/mips.c +++ b/contrib/binutils/gprof/mips.c @@ -56,24 +56,13 @@ mips_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc) indirect_child.cg.cyc.head = &indirect_child; } - if (!core_text_space) - { - return; - } - if (p_lowpc < s_lowpc) - { - p_lowpc = s_lowpc; - } - if (p_highpc > s_highpc) - { - p_highpc = s_highpc; - } DBG (CALLDEBUG, printf (_("[find_call] %s: 0x%lx to 0x%lx\n"), parent->name, (unsigned long) p_lowpc, (unsigned long) p_highpc)); for (pc = p_lowpc; pc < p_highpc; pc += 4) { - op = bfd_get_32 (core_bfd, &((char *)core_text_space)[pc - s_lowpc]); + op = bfd_get_32 (core_bfd, ((unsigned char *)core_text_space + + pc - core_text_sect->vma)); if ((op & 0xfc000000) == 0x0c000000) { /* This is a "jal" instruction. Check that the destination @@ -82,7 +71,7 @@ mips_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc) printf (_("[find_call] 0x%lx: jal"), (unsigned long) pc)); offset = (op & 0x03ffffff) << 2; dest_pc = (pc & ~(bfd_vma) 0xfffffff) | offset; - if (dest_pc >= s_lowpc && dest_pc <= s_highpc) + if (hist_check_address (dest_pc)) { child = sym_lookup (&symtab, dest_pc); DBG (CALLDEBUG, |