Date: Mon, 1 Apr 2013 21:16:32 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248991 - head/cddl/contrib/opensolaris/tools/ctf/cvt Message-ID: <201304012116.r31LGWUG014566@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Mon Apr 1 21:16:32 2013 New Revision: 248991 URL: http://svnweb.freebsd.org/changeset/base/248991 Log: Follow up to r247960 and rr247960 by also amending ctfmerge. For the only other case where STT_FILE symbols are used, in symit_next() in cddl/contrib/opensolaris/tools/ctf/cvt/input.c, save the basename of the symbol, instead of the full pathname. Reported by: avg Tested by: avg, jimharris MFC after: 1 week Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Mon Apr 1 21:13:56 2013 (r248990) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Mon Apr 1 21:16:32 2013 (r248991) @@ -387,6 +387,7 @@ GElf_Sym * symit_next(symit_data_t *si, int type) { GElf_Sym sym; + char *bname; int check_sym = (type == STT_OBJECT || type == STT_FUNC); for (; si->si_next < si->si_nument; si->si_next++) { @@ -394,8 +395,10 @@ symit_next(symit_data_t *si, int type) gelf_getsym(si->si_symd, si->si_next, &sym); si->si_curname = (caddr_t)si->si_strd->d_buf + sym.st_name; - if (GELF_ST_TYPE(sym.st_info) == STT_FILE) - si->si_curfile = si->si_curname; + if (GELF_ST_TYPE(sym.st_info) == STT_FILE) { + bname = strrchr(si->si_curname, '/'); + si->si_curfile = bname == NULL ? si->si_curname : bname + 1; + } if (GELF_ST_TYPE(sym.st_info) != type || sym.st_shndx == SHN_UNDEF)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304012116.r31LGWUG014566>