freebsd-nq/contrib/elftoolchain/libdwarf/dwarf_get_AT_name.3
Mark Johnston 7bb441c866 libdwarf: Add some constants from DWARF 5
This is not exhaustive - DWARF 5 has some new enumeration types not
implemented here - but I think I caught all the ones that are extended
in DWARF 5, plus the new compilation unit type (DW_UT_*), needed when
parsing .debug_info headers.

These were useful when extending libdwarf/ctfconvert/readelf to handle
DWARF generated by gcc 12, which is version 5 by default.

Reviewed by:	emaste
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38273
2023-02-07 15:10:24 -05:00

270 lines
5.6 KiB
Groff

.\" Copyright (c) 2011 Kai Wang
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: dwarf_get_AT_name.3 3644 2018-10-15 19:55:01Z jkoshy $
.\"
.Dd January 30, 2023
.Dt DWARF_GET_AT_NAME 3
.Os
.Sh NAME
.Nm dwarf_get_ACCESS_name ,
.Nm dwarf_get_AT_name ,
.Nm dwarf_get_ATE_name ,
.Nm dwarf_get_CC_name ,
.Nm dwarf_get_CFA_name ,
.Nm dwarf_get_CHILDREN_name ,
.Nm dwarf_get_DS_name ,
.Nm dwarf_get_DSC_name ,
.Nm dwarf_get_EH_name ,
.Nm dwarf_get_END_name ,
.Nm dwarf_get_FORM_name ,
.Nm dwarf_get_ID_name ,
.Nm dwarf_get_INL_name ,
.Nm dwarf_get_LANG_name ,
.Nm dwarf_get_LNE_name ,
.Nm dwarf_get_LNS_name ,
.Nm dwarf_get_MACINFO_name ,
.Nm dwarf_get_OP_name ,
.Nm dwarf_get_ORD_name ,
.Nm dwarf_get_TAG_name ,
.Nm dwarf_get_UT_name ,
.Nm dwarf_get_VIRTUALITY_name ,
.Nm dwarf_get_VIS_name
.Nd retrieve the symbolic names of DWARF constants
.Sh LIBRARY
.Lb libdwarf
.Sh SYNOPSIS
.In libdwarf.h
.Ft int
.Fo dwarf_get_ACCESS_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_AT_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_ATE_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_CC_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_CFA_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_CHILDREN_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_DS_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_DSC_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_EH_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_END_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_FORM_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_ID_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_INL_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_LANG_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_LNE_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_LNS_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_MACINFO_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_OP_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_ORD_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_TAG_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_UT_name
.Fa "unsigned unit_type"
.Fa "const char **str"
.Fc
.Ft int
.Fo dwarf_get_VIRTUALITY_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Ft int
.Fo dwarf_get_VIS_name
.Fa "unsigned val"
.Fa "char **str"
.Fc
.Sh DESCRIPTION
These functions return the symbolic name of a numeric DWARF constant.
.Pp
Argument
.Ar val
specifies the numeric value whose symbolic name is desired.
.Pp
Argument
.Ar str
should point to a location which will hold the returned
NUL-terminated string containing the symbolic name of the
specified value.
.Pp
The list of functions and the DWARF constants that they accept are:
.Pp
.Bl -tag -width ".Fn dwarf_get_VIRTUALITY_name" -compact
.It Fn dwarf_get_ACCESS_name
.Dv DW_ACCESS_*
constants.
.It Fn dwarf_get_AT_name
.Dv DW_AT_*
constants.
.It Fn dwarf_get_ATE_name
.Dv DW_ATE_*
constants.
.It Fn dwarf_get_CC_name
.Dv DW_CC_*
constants.
.It Fn dwarf_get_CFA_name
.Dv DW_CFA_*
constants.
.It Fn dwarf_get_CHILDREN_name
.Dv DW_CHILDREN_*
constants.
.It Fn dwarf_get_DS_name
.Dv DW_DS_*
constants.
.It Fn dwarf_get_DSC_name
.Dv DW_DSC_*
constants.
.It Fn dwarf_get_EH_name
.Dv DW_EH_PE_*
constants.
.It Fn dwarf_get_END_name
.Dv DW_END_*
constants.
.It Fn dwarf_get_FORM_name
.Dv DW_FORM_*
constants.
.It Fn dwarf_get_ID_name
.Dv DW_ID_*
constants.
.It Fn dwarf_get_INL_name
.Dv DW_INL_*
constants.
.It Fn dwarf_get_LANG_name
.Dv DW_LANG_*
constants.
.It Fn dwarf_get_LNE_name
.Dv DW_LNE_*
constants.
.It Fn dwarf_get_LNS_name
.Dv DW_LNS_*
constants.
.It Fn dwarf_get_MACINFO_name
.Dv DW_MACINFO_*
constants.
.It Fn dwarf_get_OP_name
.Dv DW_OP_*
constants.
.It Fn dwarf_get_ORD_name
.Dv DW_ORD_*
constants.
.It Fn dwarf_get_TAG_name
.Dv DW_TAG_*
constants.
.It Fn dwarf_get_UT_name
.Dv DW_UT_*
constants.
.It Fn dwarf_get_VIRTUALITY_name
.Dv DW_VIRTUALITY_*
constants.
.It Fn dwarf_get_VIS_name
.Dv DW_VIS_*
constants.
.El
.Sh RETURN VALUES
These functions return
.Dv DW_DLV_OK
on success.
If the DWARF constant denoted by argument
.Ar val
is not recognized, these function return
.Dv DW_DLV_NO_ENTRY .
.Sh SEE ALSO
.Xr dwarf 3