From 4d9fdb46b215739778ebc12079842c9905586999 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Thu, 25 Jun 2020 17:58:31 -0700 Subject: 12223 Update libdwarf to libdwarf-20200612 Reviewed by: Richard Lowe Approved by: Dan McDonald --- usr/src/lib/libdwarf/common/dwarf_funcs.c | 40 +++++++++++++------------------ 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'usr/src/lib/libdwarf/common/dwarf_funcs.c') diff --git a/usr/src/lib/libdwarf/common/dwarf_funcs.c b/usr/src/lib/libdwarf/common/dwarf_funcs.c index 8d725ae33f..64c9cad4cf 100644 --- a/usr/src/lib/libdwarf/common/dwarf_funcs.c +++ b/usr/src/lib/libdwarf/common/dwarf_funcs.c @@ -4,41 +4,31 @@ Portions Copyright (C) 2009-2010 David Anderson. All Rights Reserved. This program is free software; you can redistribute it and/or modify it - under the terms of version 2.1 of the GNU Lesser General Public License + under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation. This program is distributed in the hope that it would be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, this software is distributed without any warranty that it is - free of the rightful claim of any third person regarding infringement - or the like. Any license provided herein, whether implied or + free of the rightful claim of any third person regarding infringement + or the like. Any license provided herein, whether implied or otherwise, applies only to this software file. Patent licenses, if - any, provided herein do not apply to combinations of this program with - other software, or any other product whatsoever. + any, provided herein do not apply to combinations of this program with + other software, or any other product whatsoever. - You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write the Free Software + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, write the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301, USA. - Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane, - Mountain View, CA 94043, or: - - http://www.sgi.com - - For further information regarding this notice, see: - - http://oss.sgi.com/projects/GenInfo/NoticeExplan - */ - - #include "config.h" -#include "dwarf_incl.h" #include +#include "dwarf_incl.h" +#include "dwarf_error.h" #include "dwarf_funcs.h" #include "dwarf_global.h" @@ -51,10 +41,14 @@ dwarf_get_funcs(Dwarf_Debug dbg, if (res != DW_DLV_OK) { return res; } + if (!dbg->de_debug_funcnames.dss_size) { + return (DW_DLV_NO_ENTRY); + } + - return _dwarf_internal_get_pubnames_like_data(dbg, - dbg->de_debug_funcnames.dss_data, - dbg->de_debug_funcnames.dss_size, + return _dwarf_internal_get_pubnames_like_data(dbg, + dbg->de_debug_funcnames.dss_data, + dbg->de_debug_funcnames.dss_size, (Dwarf_Global **) funcs, /* Type punning for sections with identical format. */ ret_func_count, error, -- cgit v1.2.3