From owner-svn-src-head@FreeBSD.ORG Thu Sep 6 12:15:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 515B8106564A; Thu, 6 Sep 2012 12:15:17 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep12.mx.upcmail.net (fep12.mx.upcmail.net [62.179.121.32]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2728FC12; Thu, 6 Sep 2012 12:15:15 +0000 (UTC) Received: from edge01.upcmail.net ([192.168.13.236]) by viefep12-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20120906121514.EJAE2716.viefep12-int.chello.at@edge01.upcmail.net>; Thu, 6 Sep 2012 14:15:14 +0200 Received: from mole.fafoe.narf.at ([80.109.55.137]) by edge01.upcmail.net with edge id voFD1j0252xdvHc01oFDo7; Thu, 06 Sep 2012 14:15:14 +0200 X-SourceIP: 80.109.55.137 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id A0F666D466; Thu, 6 Sep 2012 14:15:13 +0200 (CEST) Date: Thu, 6 Sep 2012 14:15:13 +0200 From: Stefan Farfeleder To: Rui Paulo Message-ID: <20120906121513.GG1361@mole.fafoe.narf.at> References: <201209060319.q863JnDe050504@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201209060319.q863JnDe050504@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240156 - head/lib/libproc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 12:15:17 -0000 On Thu, Sep 06, 2012 at 03:19:49AM +0000, Rui Paulo wrote: > @@ -266,7 +268,11 @@ proc_addr2sym(struct proc_handle *p, uin > if (addr >= rsym && addr <= (rsym + sym.st_size)) { > s = elf_strptr(e, dynsymstridx, sym.st_name); > if (s) { > - strlcpy(name, s, namesz); > + if (strlen(s) > 2 && > + s[0] == '_' && s[1] == 'Z') > + __cxa_demangle(s, name, &namesz, NULL); > + else > + strlcpy(name, s, namesz); > memcpy(symcopy, &sym, sizeof(sym)); > /* > * DTrace expects the st_value to contain According to the documentation, __cxa_demangle will realloc the buffer if it is too small and return the new buffer. This case is not handled correctly. Stefan