svn commit: r249243 - stable/9/cddl/contrib/opensolaris/tools/ctf/cvt

Dimitry Andric dim at FreeBSD.org
Mon Apr 8 07:08:30 UTC 2013


Author: dim
Date: Mon Apr  8 07:08:29 2013
New Revision: 249243
URL: http://svnweb.freebsd.org/changeset/base/249243

Log:
  MFC r248991:
  
  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

Modified:
  stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c
Directory Properties:
  stable/9/cddl/   (props changed)
  stable/9/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c	Sun Apr  7 21:25:14 2013	(r249242)
+++ stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c	Mon Apr  8 07:08:29 2013	(r249243)
@@ -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)


More information about the svn-src-stable-9 mailing list