1cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)/* Find debugging and symbol information for a module in libdwfl. 2cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Copyright (C) 2005, 2006, 2007 Red Hat, Inc. 3cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) This file is part of Red Hat elfutils. 4cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 5cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Red Hat elfutils is free software; you can redistribute it and/or modify 6cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) it under the terms of the GNU General Public License as published by the 7cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Free Software Foundation; version 2 of the License. 8cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 9cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Red Hat elfutils is distributed in the hope that it will be useful, but 10cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) WITHOUT ANY WARRANTY; without even the implied warranty of 11cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) General Public License for more details. 13cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) You should have received a copy of the GNU General Public License along 15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) with Red Hat elfutils; if not, write to the Free Software Foundation, 16cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 18cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) In addition, as a special exception, Red Hat, Inc. gives You the 19cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) additional right to link the code of Red Hat elfutils with code licensed 20cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) under any Open Source Initiative certified open source license 21cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) (http://www.opensource.org/licenses/index.php) which requires the 22cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) distribution of source code with any binary distribution and to 23cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) distribute linked combinations of the two. Non-GPL Code permitted under 24cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) this exception must only link to the code of Red Hat elfutils through 25cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) those well defined interfaces identified in the file named EXCEPTION 26cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) found in the source code files (the "Approved Interfaces"). The files 27cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) of Non-GPL Code may instantiate templates or use macros or inline 28cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) functions from the Approved Interfaces without causing the resulting 29cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) work to be covered by the GNU General Public License. Only Red Hat, 30cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Inc. may make changes or additions to the list of Approved Interfaces. 31cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Red Hat's grant of this exception is conditioned upon your not adding 32cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) any new exceptions. If you wish to add a new Approved Interface or 33cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) exception, please contact Red Hat. You must obey the GNU General Public 34cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) License in all respects for all of the Red Hat elfutils code and other 35cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) code used in conjunction with Red Hat elfutils except the Non-GPL Code 36cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) covered by this exception. If you modify this file, you may extend this 37cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) exception to your version of the file, but you are not obligated to do 38cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) so. If you do not wish to provide this exception without modification, 39cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) you must delete this exception statement from your version and license 40cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) this file solely under the GPL without exception. 41cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 42cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Red Hat elfutils is an included package of the Open Invention Network. 43cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) An included package of the Open Invention Network is a package for which 44cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Open Invention Network licensees cross-license their patents. No patent 45cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) license is granted, either expressly or impliedly, by designation as an 46cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) included package. Should you wish to participate in the Open Invention 47cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) Network licensing program, please visit www.openinventionnetwork.com 48cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) <http://www.openinventionnetwork.com>. */ 49cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 50cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "libdwflP.h" 51cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 52cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char * 53cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)dwfl_module_addrname (Dwfl_Module *mod, GElf_Addr addr) 54cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles){ 55cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) GElf_Sym sym; 56cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) return INTUSE(dwfl_module_addrsym) (mod, addr, &sym, NULL); 57cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} 58cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)