1*5ac3bc71Schristos.\" $NetBSD: dwarf.3,v 1.6 2024/03/03 17:37:30 christos Exp $ 2e81373b4Schristos.\" 39dd9d0cfSchristos.\" Copyright (c) 2011 Joseph Koshy. All rights reserved. 49dd9d0cfSchristos.\" 59dd9d0cfSchristos.\" Redistribution and use in source and binary forms, with or without 69dd9d0cfSchristos.\" modification, are permitted provided that the following conditions 79dd9d0cfSchristos.\" are met: 89dd9d0cfSchristos.\" 1. Redistributions of source code must retain the above copyright 99dd9d0cfSchristos.\" notice, this list of conditions and the following disclaimer. 109dd9d0cfSchristos.\" 2. Redistributions in binary form must reproduce the above copyright 119dd9d0cfSchristos.\" notice, this list of conditions and the following disclaimer in the 129dd9d0cfSchristos.\" documentation and/or other materials provided with the distribution. 139dd9d0cfSchristos.\" 149dd9d0cfSchristos.\" This software is provided by Joseph Koshy ``as is'' and 159dd9d0cfSchristos.\" any express or implied warranties, including, but not limited to, the 169dd9d0cfSchristos.\" implied warranties of merchantability and fitness for a particular purpose 179dd9d0cfSchristos.\" are disclaimed. in no event shall Joseph Koshy be liable 189dd9d0cfSchristos.\" for any direct, indirect, incidental, special, exemplary, or consequential 199dd9d0cfSchristos.\" damages (including, but not limited to, procurement of substitute goods 209dd9d0cfSchristos.\" or services; loss of use, data, or profits; or business interruption) 219dd9d0cfSchristos.\" however caused and on any theory of liability, whether in contract, strict 229dd9d0cfSchristos.\" liability, or tort (including negligence or otherwise) arising in any way 239dd9d0cfSchristos.\" out of the use of this software, even if advised of the possibility of 249dd9d0cfSchristos.\" such damage. 259dd9d0cfSchristos.\" 26cdbf1fe1Sjkoshy.\" Id: dwarf.3 3929 2021-03-07 21:43:46Z jkoshy 279dd9d0cfSchristos.\" 2842bd3019Schristos.Dd December 21, 2014 299dd9d0cfSchristos.Dt DWARF 3 30604b0842Sjkoshy.Os 319dd9d0cfSchristos.Sh NAME 329dd9d0cfSchristos.Nm dwarf 339dd9d0cfSchristos.Nd access debugging information in object files 349dd9d0cfSchristos.Sh LIBRARY 359dd9d0cfSchristos.Lb libdwarf 369dd9d0cfSchristos.Sh SYNOPSIS 379dd9d0cfSchristos.In libdwarf.h 389dd9d0cfSchristos.Sh DESCRIPTION 399dd9d0cfSchristosThe 409dd9d0cfSchristos.Lb libdwarf 419dd9d0cfSchristosprovides functions that allow an application to read and write debugging 429dd9d0cfSchristosinformation in object files. 439dd9d0cfSchristosThe format of debugging information accessible through this API 449dd9d0cfSchristosis defined by the DWARF standard, see 459dd9d0cfSchristos.Xr dwarf 4 . 469dd9d0cfSchristos.Pp 479dd9d0cfSchristosThe 489dd9d0cfSchristos.Xr DWARF 3 499dd9d0cfSchristosAPI has two parts: 509dd9d0cfSchristos.Bl -bullet 519dd9d0cfSchristos.It 529dd9d0cfSchristosA consumer API set allows applications to read existing debug information 539dd9d0cfSchristosin a program object. 549dd9d0cfSchristosThe functions that comprise the DWARF consumer API are described in 559dd9d0cfSchristosthe section 569dd9d0cfSchristos.Sx "DWARF Consumer API" 579dd9d0cfSchristosbelow. 589dd9d0cfSchristos.It 599dd9d0cfSchristosA producer API set that allows applications to add debug information 609dd9d0cfSchristosto a program object. 619dd9d0cfSchristosThe functions that comprise the DWARF producer API are described in 629dd9d0cfSchristosthe section 639dd9d0cfSchristos.Sx "DWARF Producer API" 649dd9d0cfSchristosbelow. 659dd9d0cfSchristos.El 669dd9d0cfSchristos.Pp 679dd9d0cfSchristosEach function referenced below is further described in its own manual page. 689dd9d0cfSchristos.Ss Namespace use 699dd9d0cfSchristosThe DWARF library uses the following prefixes: 709dd9d0cfSchristos.Pp 719dd9d0cfSchristos.Bl -tag -width ".Li Dwarf_*" -compact 729dd9d0cfSchristos.It Li DWARF_* 739dd9d0cfSchristosUsed for error numbers and constants. 749dd9d0cfSchristos.It Li DW_* 759dd9d0cfSchristosUsed for constants. 769dd9d0cfSchristos.It Li Dwarf_* 779dd9d0cfSchristosUsed for types. 789dd9d0cfSchristos.It Li dwarf_* 799dd9d0cfSchristosUsed for functions and macros that make up the API. 809dd9d0cfSchristos.El 819dd9d0cfSchristos.Ss Data Types 829dd9d0cfSchristosThe DWARF(3) API uses the following data types: 839dd9d0cfSchristos.Pp 849dd9d0cfSchristos.Bl -tag -width ".Vt Dwarf_Unsigned" -compact 859dd9d0cfSchristos.It Vt Dwarf_Abbrev 869dd9d0cfSchristosDescribes DWARF abbreviations. 879dd9d0cfSchristos.It Vt Dwarf_Addr 889dd9d0cfSchristosA program address in the target object. 899dd9d0cfSchristos.It Vt Dwarf_Arange 909dd9d0cfSchristosDescribes address ranges. 919dd9d0cfSchristos.It Vt Dwarf_Attribute , Vt Dwarf_P_Attribute 929dd9d0cfSchristosDescribes attributes of debugging information entries. 939dd9d0cfSchristos.It Vt Dwarf_Bool 949dd9d0cfSchristosUsed for boolean states. 959dd9d0cfSchristos.It Vt Dwarf_Cie , Vt Dwarf_P_Cie 969dd9d0cfSchristosDescribes call information that is common to several frames. 979dd9d0cfSchristos.It Vt Dwarf_Debug , Vt Dwarf_P_Debug 989dd9d0cfSchristosAn opaque type describing a debug context. 999dd9d0cfSchristos.It Vt Dwarf_Die , Vt Dwarf_P_Die 1009dd9d0cfSchristosA debugging information entry. 1019dd9d0cfSchristos.It Vt Dwarf_Fde , Vt Dwarf_P_Fde 1029dd9d0cfSchristosA frame descriptor. 1039dd9d0cfSchristos.It Vt Dwarf_Func 1049dd9d0cfSchristosA descriptor representing a function. 1059dd9d0cfSchristos.It Vt Dwarf_Global 1069dd9d0cfSchristosA descriptor representing a global name. 1079dd9d0cfSchristos.It Vt Dwarf_Half 1089dd9d0cfSchristosA 16-bit wide unsigned numeric type. 1099dd9d0cfSchristos.It Vt Dwarf_Handler 1109dd9d0cfSchristosA pointer to an error handling function. 1119dd9d0cfSchristos.It Vt Dwarf_Line 1129dd9d0cfSchristosA descriptor for a source line. 1139dd9d0cfSchristos.It Vt Dwarf_Off 11442bd3019SchristosAn unsigned file offset. 1159dd9d0cfSchristos.It Vt Dwarf_P_Expr 1169dd9d0cfSchristosA descriptor for a location expression. 1179dd9d0cfSchristos.It Vt Dwarf_Ptr 1189dd9d0cfSchristosA virtual address used by an application. 1199dd9d0cfSchristos.It Vt Dwarf_Signed 1209dd9d0cfSchristosA 64-bit wide signed numeric type. 1219dd9d0cfSchristos.It Vt Dwarf_Small 1229dd9d0cfSchristosAn 8-bit wide unsigned numeric type. 1239dd9d0cfSchristos.It Vt Dwarf_Type 1249dd9d0cfSchristosA descriptor representing a user-specified type. 1259dd9d0cfSchristos.It Vt Dwarf_Unsigned 1269dd9d0cfSchristosA 64-bit wide unsigned numeric type. 1279dd9d0cfSchristos.It Vt Dwarf_Var 1289dd9d0cfSchristosA descriptor representing a static variable. 1299dd9d0cfSchristos.It Vt Dwarf_Weak 1309dd9d0cfSchristosA descriptor representing a weak name. 1319dd9d0cfSchristos.El 1329dd9d0cfSchristos.Ss Error Handling 1339dd9d0cfSchristosLibrary functions that encounter an error will return with a value 1349dd9d0cfSchristosother than 1359dd9d0cfSchristos.Dv DW_DLV_OK . 1369dd9d0cfSchristos.Pp 1379dd9d0cfSchristosThe 1389dd9d0cfSchristos.Lb libdwarf 1399dd9d0cfSchristosallows applications to specify three levels of error handling: 1409dd9d0cfSchristos.Bl -enum -compact 1419dd9d0cfSchristos.It 1429dd9d0cfSchristosMost library functions take a parameter of type 1439dd9d0cfSchristos.Vt Dwarf_Error 1449dd9d0cfSchristosthat specifies a location to store an error descriptor in 1459dd9d0cfSchristoscase of an error. 1469dd9d0cfSchristosIf an error occurs during the execution on an API, and if this 147cdbf1fe1Sjkoshyparameter is 148cdbf1fe1Sjkoshy.No non- Ns Dv NULL , 149cdbf1fe1Sjkoshythen an error descriptor is written to the location specified. 1509dd9d0cfSchristos.It 151cdbf1fe1SjkoshyOtherwise, if the error parameter was 152cdbf1fe1Sjkoshy.Dv NULL , 153cdbf1fe1Sjkoshybut if an error handler was defined for the debug context in use using 1549dd9d0cfSchristos.Xr dwarf_init 3 1559dd9d0cfSchristosor 1569dd9d0cfSchristos.Xr dwarf_seterrhand 3 , 1579dd9d0cfSchristosthen the library will invoke the specified error handler with an error 1589dd9d0cfSchristosdescriptor as argument. 1599dd9d0cfSchristos.It 1609dd9d0cfSchristosOtherwise, if a library wide error handler was specified using 1619dd9d0cfSchristos.Xr dwarf_seterrhand 3 , 1629dd9d0cfSchristosit is called. 1639dd9d0cfSchristos.El 1649dd9d0cfSchristos.Pp 1659dd9d0cfSchristosError descriptors may be used with 1669dd9d0cfSchristos.Xr dwarf_errmsg 3 1679dd9d0cfSchristosor 1689dd9d0cfSchristos.Xr dwarf_errno 3 . 1699dd9d0cfSchristos.Sh The DWARF Consumer API 1709dd9d0cfSchristosThe DWARF consumer API permits applications to read DWARF information in 1719dd9d0cfSchristosan object file. 1729dd9d0cfSchristos.Pp 1739dd9d0cfSchristosThe major functional groups of functions in the consumer API are listed 1749dd9d0cfSchristosbelow. 1759dd9d0cfSchristos.Pp 1769dd9d0cfSchristos.Bl -tag -compact -width "CCCC" 1779dd9d0cfSchristos.It Abbreviations 178604b0842Sjkoshy.Bl -tag -compact -width indent 1799dd9d0cfSchristos.It Fn dwarf_get_abbrev 1809dd9d0cfSchristosRetrieve abbreviation information at a given offset. 1819dd9d0cfSchristos.It Fn dwarf_get_abbrev_children_flag 1829dd9d0cfSchristosCheck if an abbreviation has child elements. 1839dd9d0cfSchristos.It Fn dwarf_get_abbrev_code 1849dd9d0cfSchristosRetrieve the abbreviation code for an abbreviation entry descriptor. 1859dd9d0cfSchristos.It Fn dwarf_get_abbrev_entry 1869dd9d0cfSchristosRetrieve abbreviation information for an abbreviation entry 1879dd9d0cfSchristosdescriptor. 1889dd9d0cfSchristos.It Fn dwarf_get_abbrev_tag 1899dd9d0cfSchristosRetrieve the tag for an abbreviation entry. 1909dd9d0cfSchristos.El 1919dd9d0cfSchristos.It Addresses 192604b0842Sjkoshy.Bl -tag -compact -width indent 1939dd9d0cfSchristos.It Fn dwarf_get_address_size 1949dd9d0cfSchristosReturn the number of bytes needed to represent an address. 1959dd9d0cfSchristos.It Fn dwarf_get_arange 1969dd9d0cfSchristosSearch for an address range descriptor covering an address. 1979dd9d0cfSchristos.It Fn dwarf_get_arange_cu_header_offset 1989dd9d0cfSchristosRetrieve the offsets associated with an address range descriptor. 1999dd9d0cfSchristos.It Fn dwarf_get_arange_info 2009dd9d0cfSchristosExtract address range information from a descriptor. 2019dd9d0cfSchristos.It Fn dwarf_get_aranges 2029dd9d0cfSchristosRetrieve program address space mappings. 2039dd9d0cfSchristos.It Fn dwarf_get_cu_die_offset 2049dd9d0cfSchristosRetrieve the offset associated with a compilation unit for an address 2059dd9d0cfSchristosrange descriptor. 2069dd9d0cfSchristos.It Fn dwarf_get_ranges , Fn dwarf_get_ranges_a 2079dd9d0cfSchristosRetrieve information about non-contiguous address ranges for 2089dd9d0cfSchristosa debugging information entry. 2099dd9d0cfSchristos.El 2109dd9d0cfSchristos.It Attributes 211604b0842Sjkoshy.Bl -tag -compact -width indent 2129dd9d0cfSchristos.It Fn dwarf_arrayorder 2139dd9d0cfSchristosRetrieve the value of a 2149dd9d0cfSchristos.Dv DW_AT_ordering 2159dd9d0cfSchristosattribute. 2169dd9d0cfSchristos.It Fn dwarf_attr 2179dd9d0cfSchristosRetrieve an attribute descriptor. 2189dd9d0cfSchristos.It Fn dwarf_attrlist 2199dd9d0cfSchristosRetrieve attribute descriptors for a debugging information entry. 22042bd3019Schristos.It Fn dwarf_attroffset 22142bd3019SchristosRetrieve the section-relative offset of an attribute descriptor. 2229dd9d0cfSchristos.It Fn dwarf_attrval_flag 2239dd9d0cfSchristosRetrieve a 2249dd9d0cfSchristos.Dv DW_AT_FORM_flag 2259dd9d0cfSchristosvalue. 2269dd9d0cfSchristos.It Fn dwarf_attrval_signed 2279dd9d0cfSchristosRetrieve an attribute's value as a signed integral quantity. 2289dd9d0cfSchristos.It Fn dwarf_attrval_string 2299dd9d0cfSchristosRetrieve an attribute's value as a NUL-terminated string. 2309dd9d0cfSchristos.It Fn dwarf_attrval_unsigned 2319dd9d0cfSchristosRetrieve an attribute's value as an unsigned integral quantity. 2329dd9d0cfSchristos.It Fn dwarf_bitoffset , 2339dd9d0cfSchristosRetrieve the value of a 2349dd9d0cfSchristos.Dv DW_AT_bit_offset 2359dd9d0cfSchristosattribute. 2369dd9d0cfSchristos.It Fn dwarf_bitsize , 2379dd9d0cfSchristosRetrieve the value of a 2389dd9d0cfSchristos.Dv DW_AT_bit_size 2399dd9d0cfSchristosattribute. 2409dd9d0cfSchristos.It Fn dwarf_bytesize 2419dd9d0cfSchristosRetrieve the value of a 2429dd9d0cfSchristos.Dv DW_AT_byte_size 2439dd9d0cfSchristosattribute. 2449dd9d0cfSchristos.It Fn dwarf_formaddr 2459dd9d0cfSchristosReturn the value of an 2469dd9d0cfSchristos.Dv ADDRESS Ns - Ns 2479dd9d0cfSchristosclass attribute. 2489dd9d0cfSchristos.It Fn dwarf_formblock 2499dd9d0cfSchristosReturn the value of a 2509dd9d0cfSchristos.Dv BLOCK Ns - Ns 2519dd9d0cfSchristosclass attribute 2529dd9d0cfSchristos.It Fn dwarf_formexprloc 2539dd9d0cfSchristosReturn information about a location expression. 2549dd9d0cfSchristos.It Fn dwarf_formflag 2559dd9d0cfSchristosRetrieve information about a 2569dd9d0cfSchristos.Dv BOOLEAN Ns - Ns 2579dd9d0cfSchristosclass attribute. 2589dd9d0cfSchristos.It Fn dwarf_formref , Fn dwarf_global_formref 2599dd9d0cfSchristosRetrieve offsets for 2609dd9d0cfSchristos.Dv REFERENCE Ns - Ns 2619dd9d0cfSchristosclass attributes. 2629dd9d0cfSchristos.It Fn dwarf_formsdata , Fn dwarf_formudata 2639dd9d0cfSchristosRetrieve the value of a 2649dd9d0cfSchristos.Dv CONSTANT Ns - Ns 2659dd9d0cfSchristosclass attribute. 2669dd9d0cfSchristos.It Fn dwarf_formsig8 2679dd9d0cfSchristosReturn the type signature for a DWARF type. 2689dd9d0cfSchristos.It Fn dwarf_formstring 2699dd9d0cfSchristosRetrieve information about a 2709dd9d0cfSchristos.Dv STRING Ns - Ns 2719dd9d0cfSchristosclass attribute. 2729dd9d0cfSchristos.It Fn dwarf_get_form_class 2739dd9d0cfSchristosRetrieve the form class for an attribute. 2749dd9d0cfSchristos.It Fn dwarf_hasattr 2759dd9d0cfSchristosCheck for the presence of an attribute. 2769dd9d0cfSchristos.It Fn dwarf_hasform 2779dd9d0cfSchristosCheck if an attribute has the given form. 2789dd9d0cfSchristos.It Fn dwarf_whatattr 2799dd9d0cfSchristosRetrieve the attribute code for an attribute. 2809dd9d0cfSchristos.It Fn dwarf_whatform , Fn dwarf_whatform_direct 2819dd9d0cfSchristosRetrieve the form of an attribute. 2829dd9d0cfSchristos.El 2839dd9d0cfSchristos.It Call Information Entries and Frame Descriptor Entries 284604b0842Sjkoshy.Bl -tag -compact -width indent 2859dd9d0cfSchristos.It Fn dwarf_get_cie_index 2869dd9d0cfSchristosRetrieve the index for a CIE descriptor. 2879dd9d0cfSchristos.It Fn dwarf_get_cie_info 2889dd9d0cfSchristosRetrieve information from a CIE descriptor. 2899dd9d0cfSchristos.It Fn dwarf_get_cie_of_fde 2909dd9d0cfSchristosRetrieve a CIE descriptor. 2919dd9d0cfSchristos.It Fn dwarf_get_fde_at_pc 2929dd9d0cfSchristosRetrieve an FDE descriptor for an address. 2939dd9d0cfSchristos.It Fn dwarf_get_fde_info_for_all_regs 2949dd9d0cfSchristosRetrieve register rule row. 2959dd9d0cfSchristos.It Fn dwarf_get_fde_info_for_all_regs3 2969dd9d0cfSchristosRetrieve register rule row (revised API). 2979dd9d0cfSchristos.It Fn dwarf_get_fde_info_for_cfa_reg3 2989dd9d0cfSchristosRetrieve a CFA register rule. 2999dd9d0cfSchristos.It Fn dwarf_get_fde_info_for_reg 3009dd9d0cfSchristosRetrieve a register rule. 3019dd9d0cfSchristos.It Fn dwarf_get_fde_info_for_reg3 3029dd9d0cfSchristosRetrieve a register rule (revised API). 3039dd9d0cfSchristos.It Fn dwarf_get_fde_instr_bytes 3049dd9d0cfSchristosRetrieve instructions from an FDE descriptor. 3059dd9d0cfSchristos.It Fn dwarf_get_fde_list , Fn dwarf_get_fde_list_eh 3069dd9d0cfSchristosRetrieve frame information. 3079dd9d0cfSchristos.It Fn dwarf_get_fde_n 3089dd9d0cfSchristosRetrieve an FDE descriptor. 3099dd9d0cfSchristos.It Fn dwarf_get_fde_range 3109dd9d0cfSchristosRetrieve range information from an FDE descriptor. 3119dd9d0cfSchristos.El 3129dd9d0cfSchristos.It Compilation Units 313604b0842Sjkoshy.Bl -tag -compact -width indent 31442bd3019Schristos.It Xo 31542bd3019Schristos.Fn dwarf_get_cu_die_offset_given_cu_header_offset , 31642bd3019Schristos.Fn dwarf_get_cu_die_offset_given_cu_header_offset_b 31742bd3019Schristos.Xc 3189dd9d0cfSchristosRetrieve the offset of the debugging information entry for a 31942bd3019Schristoscompilation or type unit. 32042bd3019Schristos.It Xo 32142bd3019Schristos.Fn dwarf_next_cu_header , 32242bd3019Schristos.Fn dwarf_next_cu_header_b , 32342bd3019Schristos.Fn dwarf_next_cu_header_c 32442bd3019Schristos.Xc 3259dd9d0cfSchristosStep through compilation units in a debug context. 3269dd9d0cfSchristos.El 3279dd9d0cfSchristos.It Debugging Information Entries 328604b0842Sjkoshy.Bl -tag -compact -width indent 3299dd9d0cfSchristos.It Fn dwarf_child 3309dd9d0cfSchristosReturns the child of a debugging information entry. 3319dd9d0cfSchristos.It Fn dwarf_die_abbrev_code 3329dd9d0cfSchristosReturns the abbreviation code for a debugging information entry. 3339dd9d0cfSchristos.It Fn dwarf_die_CU_offset , Fn dwarf_die_CU_offset_range 3349dd9d0cfSchristosRetrieve offsets and lengths for a compilation unit. 3359dd9d0cfSchristos.It Fn dwarf_diename 3369dd9d0cfSchristosReturns the 3379dd9d0cfSchristos.Dv DW_AT_name 3389dd9d0cfSchristosattribute for a debugging information entry. 3399dd9d0cfSchristos.It Fn dwarf_dieoffset 3409dd9d0cfSchristosRetrieves the offset for a debugging information entry. 34142bd3019Schristos.It Fn dwarf_get_die_infotypes_flag 34242bd3019SchristosIndicate the originating section for a debugging information entry. 34342bd3019Schristos.It Fn dwarf_highpc , Fn dwarf_highpc_b 3449dd9d0cfSchristosReturn the highest PC value for a debugging information entry. 3459dd9d0cfSchristos.It Fn dwarf_lowpc 3469dd9d0cfSchristosReturn the lowest PC value for a debugging information entry. 34742bd3019Schristos.It Fn dwarf_offdie , Fn dwarf_offdie_b 3489dd9d0cfSchristosRetrieve a debugging information entry given an offset. 34942bd3019Schristos.It Fn dwarf_siblingof , Fn dwarf_siblingof_b 3509dd9d0cfSchristosRetrieve the sibling descriptor for a debugging information entry. 3519dd9d0cfSchristos.It Fn dwarf_srclang 35242bd3019SchristosRetrieve the source language attribute for a debugging information 3539dd9d0cfSchristosentry. 3549dd9d0cfSchristos.It Fn dwarf_tag 3559dd9d0cfSchristosRetrieve the tag for a debugging information entry. 3569dd9d0cfSchristos.El 3579dd9d0cfSchristos.It Functions 358604b0842Sjkoshy.Bl -tag -compact -width indent 3599dd9d0cfSchristos.It Fn dwarf_func_cu_offset 3609dd9d0cfSchristosRetrieves the offset for the compilation unit for a function. 3619dd9d0cfSchristos.It Fn dwarf_func_die_offset 3629dd9d0cfSchristosRetrieves the offset for the debugging information entry for a 3639dd9d0cfSchristosfunction. 3649dd9d0cfSchristos.It Fn dwarf_funcname 3659dd9d0cfSchristosRetrieves the name of a function. 3669dd9d0cfSchristos.It Fn dwarf_func_name_offsets 3679dd9d0cfSchristosRetrieve both the name and offsets for a function. 3689dd9d0cfSchristos.It Fn dwarf_get_funcs 3699dd9d0cfSchristosRetrieve information about static functions. 3709dd9d0cfSchristos.El 3719dd9d0cfSchristos.It Globals 372604b0842Sjkoshy.Bl -tag -compact -width indent 3739dd9d0cfSchristos.It Fn dwarf_get_globals 3749dd9d0cfSchristosRetrieve a list of globals. 3759dd9d0cfSchristos.It Fn dwarf_global_cu_offset 3769dd9d0cfSchristosReturn the offset for compilation unit for a global. 3779dd9d0cfSchristos.It Fn dwarf_global_die_offset 3789dd9d0cfSchristosReturn the offset for the debugging information entry for a global. 3799dd9d0cfSchristos.It Fn dwarf_global_name_offsets 3809dd9d0cfSchristosReturn the name and offsets for a global. 3819dd9d0cfSchristos.It Fn dwarf_globname 3829dd9d0cfSchristosReturn the name for a global. 3839dd9d0cfSchristos.El 3849dd9d0cfSchristos.It Initialization and Finalization 3859dd9d0cfSchristosFunctions 3869dd9d0cfSchristos.Fn dwarf_elf_init 3879dd9d0cfSchristosand 3889dd9d0cfSchristos.Fn dwarf_init 3899dd9d0cfSchristosmay be used for initialization. 3909dd9d0cfSchristosThe function 3919dd9d0cfSchristos.Fn dwarf_finish 3929dd9d0cfSchristosmay be used to release resources. 3939dd9d0cfSchristos.Pp 3949dd9d0cfSchristosThe functions 3959dd9d0cfSchristos.Fn dwarf_object_init 3969dd9d0cfSchristosand 3979dd9d0cfSchristos.Fn dwarf_object_finish 3989dd9d0cfSchristosallow an application to specify alternate low-level file access 3999dd9d0cfSchristosroutines. 4009dd9d0cfSchristos.It Line Numbers 401604b0842Sjkoshy.Bl -tag -compact -width indent 4029dd9d0cfSchristos.It Fn dwarf_lineaddr 4039dd9d0cfSchristosRetrieve the program address for a source line. 4049dd9d0cfSchristos.It Fn dwarf_linebeginstatement 4059dd9d0cfSchristosCheck if a source line corresponds to the beginning of a statement. 4069dd9d0cfSchristos.It Fn dwarf_lineblock 4079dd9d0cfSchristosCheck if a source line corresponds to the start of a basic block. 4089dd9d0cfSchristos.It Fn dwarf_lineendsequence 4099dd9d0cfSchristosCheck if the source line corresponds to the end of a sequence of 4109dd9d0cfSchristosinstructions. 4119dd9d0cfSchristos.It Fn dwarf_lineno 4129dd9d0cfSchristosRetrieve the line number for a line descriptor. 4139dd9d0cfSchristos.It Fn dwarf_lineoff 4149dd9d0cfSchristosRetrieve the column number for a line descriptor. 4159dd9d0cfSchristos.It Fn dwarf_linesrc 4169dd9d0cfSchristosRetrieve the source file for a line descriptor. 4179dd9d0cfSchristos.It Fn dwarf_line_srcfileno 4189dd9d0cfSchristosRetrieve the index of the source file for a line descriptor. 4199dd9d0cfSchristos.It Fn dwarf_srcfiles 4209dd9d0cfSchristosRetrieve source files for a compilation unit. 4219dd9d0cfSchristos.It Fn dwarf_srclines 4229dd9d0cfSchristosReturn line number information for a compilation unit. 4239dd9d0cfSchristos.El 4249dd9d0cfSchristos.It Location Lists 425604b0842Sjkoshy.Bl -tag -compact -width indent 4269dd9d0cfSchristos.It Fn dwarf_get_loclist_entry 4279dd9d0cfSchristosRetrieve a location list entry. 4289dd9d0cfSchristos.It Fn dwarf_loclist , Fn dwarf_loclist_n 4299dd9d0cfSchristosRetrieve location expressions. 43042bd3019Schristos.It Xo 43142bd3019Schristos.Fn dwarf_loclist_from_expr , 43242bd3019Schristos.Fn dwarf_loclist_from_expr_a , 43342bd3019Schristos.Fn dwarf_loclist_from_expr_b 43442bd3019Schristos.Xc 4359dd9d0cfSchristosTranslate a location expression into a location descriptor. 4369dd9d0cfSchristos.El 4379dd9d0cfSchristos.It Error Handling 438604b0842Sjkoshy.Bl -tag -compact -width indent 4399dd9d0cfSchristos.It Fn dwarf_errmsg 4409dd9d0cfSchristosRetrieve a human-readable error message. 4419dd9d0cfSchristos.It Fn dwarf_errno 4429dd9d0cfSchristosRetrieve an error number from an error descriptor. 4439dd9d0cfSchristos.It Fn dwarf_seterrarg 4449dd9d0cfSchristosSet the argument passed to a callback error handler. 4459dd9d0cfSchristos.It Fn dwarf_seterrhand 4469dd9d0cfSchristosSet the callback handler to be called in case of an error. 4479dd9d0cfSchristos.El 4489dd9d0cfSchristos.It Frame Handling 449604b0842Sjkoshy.Bl -tag -compact -width indent 4509dd9d0cfSchristos.It Fn dwarf_expand_frame_instructions 4519dd9d0cfSchristosTranslate frame instruction bytes. 4529dd9d0cfSchristos.It Fn dwarf_set_frame_cfa_value 4539dd9d0cfSchristosSet the CFA parameter for the internal register rule table. 4549dd9d0cfSchristos.It Fn dwarf_set_frame_rule_initial_value 4559dd9d0cfSchristosSet the initial value of the register rules in the internal register 4569dd9d0cfSchristosrule table. 4579dd9d0cfSchristos.It Fn dwarf_set_frame_rule_table_size 4589dd9d0cfSchristosSet the maximum number of columns in the register rule table. 4599dd9d0cfSchristos.It Fn dwarf_set_frame_same_value 4609dd9d0cfSchristosSet the register number representing the 4619dd9d0cfSchristos.Dq "same value" 4629dd9d0cfSchristosrule. 4639dd9d0cfSchristos.It Fn dwarf_set_frame_undefined_value 4649dd9d0cfSchristosSet the register number representing the 4659dd9d0cfSchristos.Dq "undefined" 4669dd9d0cfSchristosrule. 4679dd9d0cfSchristos.El 4689dd9d0cfSchristos.It Macros 469604b0842Sjkoshy.Bl -tag -compact -width indent 4709dd9d0cfSchristos.It Fn dwarf_find_macro_value_start 4719dd9d0cfSchristosReturn the macro value part of a macro string. 4729dd9d0cfSchristos.It Fn dwarf_get_macro_details 4739dd9d0cfSchristosRetrieve macro information. 4749dd9d0cfSchristos.El 4759dd9d0cfSchristos.It Memory Management 4769dd9d0cfSchristosIn the DWARF consumer API, the rules for memory management differ 4779dd9d0cfSchristosbetween functions. 4789dd9d0cfSchristosIn some cases, the memory areas returned to the application by the 4799dd9d0cfSchristoslibrary are freed by calling specific API functions. 4809dd9d0cfSchristosIn others, the deallocation function 4819dd9d0cfSchristos.Fn dwarf_dealloc 4829dd9d0cfSchristossuffices. 4839dd9d0cfSchristosThe individual manual pages for the API's functions document the 4849dd9d0cfSchristosspecific memory management rules to be followed. 4859dd9d0cfSchristos.Pp 4869dd9d0cfSchristosThe function 4879dd9d0cfSchristos.Fn dwarf_dealloc 4889dd9d0cfSchristosis used to mark memory arenas as unused. 4899dd9d0cfSchristosAdditionally, the following functions release specific types of 4909dd9d0cfSchristosDWARF resources: 4919dd9d0cfSchristos.Fn dwarf_fde_cie_list_dealloc , 4929dd9d0cfSchristos.Fn dwarf_funcs_dealloc , 4939dd9d0cfSchristos.Fn dwarf_globals_dealloc , 4949dd9d0cfSchristos.Fn dwarf_pubtypes_dealloc , 4959dd9d0cfSchristos.Fn dwarf_ranges_dealloc , 4969dd9d0cfSchristos.Fn dwarf_srclines_dealloc , 4979dd9d0cfSchristos.Fn dwarf_types_dealloc , 4989dd9d0cfSchristos.Fn dwarf_vars_dealloc , 4999dd9d0cfSchristosand 5009dd9d0cfSchristos.Fn dwarf_weaks_dealloc . 5019dd9d0cfSchristos.It Symbol Constants 5029dd9d0cfSchristosThe following functions may be used to return symbolic names 5039dd9d0cfSchristosfor DWARF constants: 5049dd9d0cfSchristos.Fn dwarf_get_ACCESS_name , 5059dd9d0cfSchristos.Fn dwarf_get_AT_name , 5069dd9d0cfSchristos.Fn dwarf_get_ATE_name , 5079dd9d0cfSchristos.Fn dwarf_get_CC_name , 5089dd9d0cfSchristos.Fn dwarf_get_CFA_name , 5099dd9d0cfSchristos.Fn dwarf_get_CHILDREN_name , 5109dd9d0cfSchristos.Fn dwarf_get_DS_name , 5119dd9d0cfSchristos.Fn dwarf_get_DSC_name , 5129dd9d0cfSchristos.Fn dwarf_get_EH_name , 5139dd9d0cfSchristos.Fn dwarf_get_END_name , 5149dd9d0cfSchristos.Fn dwarf_get_FORM_name , 5159dd9d0cfSchristos.Fn dwarf_get_ID_name , 5169dd9d0cfSchristos.Fn dwarf_get_INL_name , 5179dd9d0cfSchristos.Fn dwarf_get_LANG_name , 5189dd9d0cfSchristos.Fn dwarf_get_LNE_name , 5199dd9d0cfSchristos.Fn dwarf_get_LNS_name , 5209dd9d0cfSchristos.Fn dwarf_get_MACINFO_name , 5219dd9d0cfSchristos.Fn dwarf_get_OP_name , 5229dd9d0cfSchristos.Fn dwarf_get_ORD_name , 5239dd9d0cfSchristos.Fn dwarf_get_TAG_name , 5249dd9d0cfSchristos.Fn dwarf_get_VIRTUALITY_name , 5259dd9d0cfSchristosand 5269dd9d0cfSchristos.Fn dwarf_get_VIS_name . 5279dd9d0cfSchristos.It Types 528604b0842Sjkoshy.Bl -tag -compact -width indent 5299dd9d0cfSchristos.It Fn dwarf_get_pubtypes , Fn dwarf_get_types 5309dd9d0cfSchristosRetrieve descriptors for user-defined types. 53142bd3019Schristos.It Fn dwarf_next_types_section 53242bd3019SchristosStep through 53342bd3019Schristos.Dq \&.debug_types 53442bd3019Schristossections in a debug context. 5359dd9d0cfSchristos.It Fn dwarf_pubtype_cu_offset , Fn dwarf_type_cu_offset 5369dd9d0cfSchristosReturn the offset for the compilation unit for a type. 5379dd9d0cfSchristos.It Fn dwarf_pubtype_die_offset , Fn dwarf_type_die_offset 5389dd9d0cfSchristosReturn the offset for the debugging information entry for a type. 5399dd9d0cfSchristos.It Fn dwarf_pubtypename , Fn dwarf_typename 5409dd9d0cfSchristosRetrieve the name of a type. 5419dd9d0cfSchristos.It Fn dwarf_pubtype_name_offsets , Fn dwarf_type_name_offsets 5429dd9d0cfSchristosRetrieve the name and offsets for a type. 5439dd9d0cfSchristos.El 5449dd9d0cfSchristos.It Variables 545604b0842Sjkoshy.Bl -tag -compact -width indent 5469dd9d0cfSchristos.It Fn dwarf_get_vars 5479dd9d0cfSchristosRetrieve descriptors for static variables. 5489dd9d0cfSchristos.It Fn dwarf_var_cu_offset 5499dd9d0cfSchristosReturn the offset for the compilation unit for a variable. 5509dd9d0cfSchristos.It Fn dwarf_var_die_offset 5519dd9d0cfSchristosReturn the offset for the debugging information entry for a variable. 5529dd9d0cfSchristos.It Fn dwarf_varname 5539dd9d0cfSchristosRetrieve the name of a variable. 5549dd9d0cfSchristos.It Fn dwarf_var_name_offsets 5559dd9d0cfSchristosRetrieve the name and offsets for a variable. 5569dd9d0cfSchristos.El 5579dd9d0cfSchristos.It Weak Symbols 558604b0842Sjkoshy.Bl -tag -compact -width indent 5599dd9d0cfSchristos.It Fn dwarf_get_weaks 5609dd9d0cfSchristosRetrieve information about weak symbols. 5619dd9d0cfSchristos.It Fn dwarf_weak_cu_offset 5629dd9d0cfSchristosReturn the offset for the compilation unit for a weak symbol. 5639dd9d0cfSchristos.It Fn dwarf_weak_die_offset 5649dd9d0cfSchristosReturn the offset for the debugging information entry for a weak symbol. 5659dd9d0cfSchristos.It Fn dwarf_weakname 5669dd9d0cfSchristosRetrieve the name of a weak symbol. 5679dd9d0cfSchristos.It Fn dwarf_weak_name_offsets 5689dd9d0cfSchristosRetrieve the name and offsets for a weak symbol. 5699dd9d0cfSchristos.El 5709dd9d0cfSchristos.It Miscellaneous 571604b0842Sjkoshy.Bl -tag -compact -width indent 5729dd9d0cfSchristos.It Fn dwarf_get_elf 5739dd9d0cfSchristosRetrieve the ELF descriptor for a debug context, see 5749dd9d0cfSchristos.Xr elf 3 . 5759dd9d0cfSchristos.It Fn dwarf_get_str 5769dd9d0cfSchristosRetrieve a NUL-terminated string from the DWARF string section. 5779dd9d0cfSchristos.It Fn dwarf_set_reloc_application 5789dd9d0cfSchristosControl whether relocations are to be handled by 5799dd9d0cfSchristos.Lb libdwarf . 5809dd9d0cfSchristos.El 5819dd9d0cfSchristos.El 5829dd9d0cfSchristos.Sh The DWARF Producer API 5839dd9d0cfSchristosThe DWARF producer API permits applications to add DWARF information to 5849dd9d0cfSchristosan object file. 5859dd9d0cfSchristos.Pp 5869dd9d0cfSchristosThe major functional groups of functions in the producer API are listed 5879dd9d0cfSchristosbelow. 5889dd9d0cfSchristos.Bl -tag -width "CCCC" 5899dd9d0cfSchristos.It Attribute Management 5909dd9d0cfSchristosThe following functions are used to attach attributes to a debugging 5919dd9d0cfSchristosinformation entry: 5929dd9d0cfSchristos.Fn dwarf_add_AT_comp_dir , 5939dd9d0cfSchristos.Fn dwarf_add_AT_const_value_signedint , 5949dd9d0cfSchristos.Fn dwarf_add_AT_const_value_string , 5959dd9d0cfSchristos.Fn dwarf_add_AT_const_value_unsignedint , 5969dd9d0cfSchristos.Fn dwarf_add_AT_dataref , 5979dd9d0cfSchristos.Fn dwarf_add_AT_flag , 5989dd9d0cfSchristos.Fn dwarf_add_AT_location_expr , 5999dd9d0cfSchristos.Fn dwarf_add_AT_name , 6009dd9d0cfSchristos.Fn dwarf_add_AT_producer , 6019dd9d0cfSchristos.Fn dwarf_add_AT_ref_address , 6029dd9d0cfSchristos.Fn dwarf_add_AT_reference , 6039dd9d0cfSchristos.Fn dwarf_add_AT_signed_const , 6049dd9d0cfSchristos.Fn dwarf_add_AT_string , 6059dd9d0cfSchristos.Fn dwarf_add_AT_targ_address , 6069dd9d0cfSchristos.Fn dwarf_add_AT_targ_address_b 6079dd9d0cfSchristosand 6089dd9d0cfSchristos.Fn dwarf_add_AT_unsigned_const . 6099dd9d0cfSchristos.It Debugging Information Entry Management 610604b0842Sjkoshy.Bl -tag -compact -width indent 6119dd9d0cfSchristos.It Fn dwarf_add_die_to_debug 6129dd9d0cfSchristosSet the root debugging information entry for a DWARF producer instance. 6139dd9d0cfSchristos.It Fn dwarf_die_link 6149dd9d0cfSchristosLinks debugging information entries. 6159dd9d0cfSchristos.It Fn dwarf_new_die 6169dd9d0cfSchristosAllocate a new debugging information entry. 6179dd9d0cfSchristos.El 6189dd9d0cfSchristos.It Initialization and Finalization 6199dd9d0cfSchristosThe functions 6209dd9d0cfSchristos.Fn dwarf_producer_init 6219dd9d0cfSchristosand 6229dd9d0cfSchristos.Fn dwarf_producer_init_b 6239dd9d0cfSchristosare used to initialize a producer instance. 6249dd9d0cfSchristos.Pp 6259dd9d0cfSchristosWhen done, applications release resources using the function 6269dd9d0cfSchristos.Fn dwarf_producer_finish . 6279dd9d0cfSchristos.It Relocations and Sections 628604b0842Sjkoshy.Bl -tag -compact -width indent 6299dd9d0cfSchristos.It Fn dwarf_get_relocation_info 6309dd9d0cfSchristosRetrieve a relocation array from a producer instance. 6319dd9d0cfSchristos.It Fn dwarf_get_relocation_info_count 6329dd9d0cfSchristosReturn the number of relocation arrays for a producer instance. 6339dd9d0cfSchristos.It Fn dwarf_get_section_bytes 6349dd9d0cfSchristosRetrieve the ELF byte stream for a section. 6359dd9d0cfSchristos.It Fn dwarf_reset_section_bytes 6369dd9d0cfSchristosReset internal state for a producer instance. 6379dd9d0cfSchristos.It Fn dwarf_transform_to_disk_form 6389dd9d0cfSchristosPrepare byte streams for writing out. 6399dd9d0cfSchristos.El 6409dd9d0cfSchristos.It Macros 641604b0842Sjkoshy.Bl -tag -compact -width indent 6429dd9d0cfSchristos.It Fn dwarf_def_macro 6439dd9d0cfSchristosAdd a macro definition. 6449dd9d0cfSchristos.It Fn dwarf_end_macro_file , Fn dwarf_start_macro_file 6459dd9d0cfSchristosRecord macro file related information. 6469dd9d0cfSchristos.It Fn dwarf_undef_macro 6479dd9d0cfSchristosNote the removal of a macro definition. 6489dd9d0cfSchristos.It Fn dwarf_vendor_ext 6499dd9d0cfSchristosEnables storing macro information as specified in the DWARF standard. 6509dd9d0cfSchristos.El 6519dd9d0cfSchristos.It Symbols, Expressions, Addresses and Offsets 652604b0842Sjkoshy.Bl -tag -compact -width indent 6539dd9d0cfSchristos.It Fn dwarf_add_arange , Fn dwarf_add_arange_b 6549dd9d0cfSchristosAdd address range information. 6559dd9d0cfSchristos.It Fn dwarf_add_directory_decl 6569dd9d0cfSchristosAdd information about an include directory to a producer instance. 6579dd9d0cfSchristos.It Fn dwarf_add_fde_inst 6589dd9d0cfSchristosAdd an operation to a frame descriptor entry. 6599dd9d0cfSchristos.It Fn dwarf_add_file_decl 6609dd9d0cfSchristosAdd information about a source file to a producer instance. 6619dd9d0cfSchristos.It Fn dwarf_add_frame_cie 6629dd9d0cfSchristosAdd call information to a frame descriptor. 6639dd9d0cfSchristos.It Fn dwarf_add_frame_fde , Fn dwarf_add_frame_fde_b 6649dd9d0cfSchristosLink a frame descriptor to a producer instance. 6659dd9d0cfSchristos.It Fn dwarf_add_funcname 6669dd9d0cfSchristosAdd information about a function to a producer instance. 6679dd9d0cfSchristos.It Fn dwarf_add_line_entry 6689dd9d0cfSchristosRecord mapping information between machine addresses and a source line. 6699dd9d0cfSchristos.It Fn dwarf_add_expr_addr , Fn dwarf_add_expr_addr_b 6709dd9d0cfSchristosAdd a 6719dd9d0cfSchristos.Dv DW_OP_addr 6729dd9d0cfSchristosopcode to a location expression. 6739dd9d0cfSchristos.It Fn dwarf_add_expr_gen 6749dd9d0cfSchristosAdd an operator to a location expression. 6759dd9d0cfSchristos.It Fn dwarf_add_pubname 6769dd9d0cfSchristosAdd information about a global name to a producer instance. 6779dd9d0cfSchristos.It Fn dwarf_add_typename 6789dd9d0cfSchristosAdd information about a type to a producer instance. 6799dd9d0cfSchristos.It Fn dwarf_add_varname 6809dd9d0cfSchristosAdd information about a static variable to a producer instance. 6819dd9d0cfSchristos.It Fn dwarf_add_weakname 6829dd9d0cfSchristosAdd information about a weak symbol to a producer instance. 6839dd9d0cfSchristos.It Fn dwarf_expr_current_offset 6849dd9d0cfSchristosRetrieve the current size of a location expression. 6859dd9d0cfSchristos.It Fn dwarf_expr_into_block 6869dd9d0cfSchristosConvert a location expression into a byte stream. 6879dd9d0cfSchristos.It Fn dwarf_fde_cfa_offset 6889dd9d0cfSchristosAppend a 6899dd9d0cfSchristos.Dv DW_CFA_offset 6909dd9d0cfSchristosoperation to a frame descriptor. 6919dd9d0cfSchristos.It Fn dwarf_lne_end_sequence , Fn dwarf_lne_set_address 6929dd9d0cfSchristosNote address ranges for source lines. 6939dd9d0cfSchristos.It Fn dwarf_new_expr 6949dd9d0cfSchristosAllocate a location expression descriptor. 6959dd9d0cfSchristos.It Fn dwarf_new_fde 6969dd9d0cfSchristosAllocate a frame descriptor. 6979dd9d0cfSchristos.El 6989dd9d0cfSchristos.It Miscellaneous 6999dd9d0cfSchristosThe function 7009dd9d0cfSchristos.Fn dwarf_producer_set_isa 7019dd9d0cfSchristossets the instruction set architecture for the producer instance. 7029dd9d0cfSchristos.El 7039dd9d0cfSchristos.Sh COMPATIBILITY 7049dd9d0cfSchristosThis implementation is believed to be source compatible with the 7059dd9d0cfSchristosSGI/GNU DWARF(3) library, version 20110113. 7069dd9d0cfSchristos.Pp 7079dd9d0cfSchristosKnown differences with the SGI/GNU library include: 7089dd9d0cfSchristos.Bl -bullet -compact 7099dd9d0cfSchristos.It 7109dd9d0cfSchristosThe memory management scheme used differs, in a backward-compatible 7119dd9d0cfSchristosway. 7129dd9d0cfSchristosSee 7139dd9d0cfSchristos.Sx Memory Management 7149dd9d0cfSchristosabove, for coding guidelines for portable applications. 7159dd9d0cfSchristos.It 7169dd9d0cfSchristosThere is provision for setting a library-wide error handler in 7179dd9d0cfSchristosaddition to the per-debug context handlers supported by the SGI/GNU 7189dd9d0cfSchristosAPI, see the subsection 7199dd9d0cfSchristos.Sx Error Handling 7209dd9d0cfSchristosabove. 72142bd3019Schristos.El 72242bd3019Schristos.Ss Extensions 72342bd3019SchristosThe following APIs are extensions specific to this implementation: 72442bd3019Schristos.Bl -bullet -compact 7259dd9d0cfSchristos.It 72642bd3019Schristos.Fn dwarf_attroffset 72742bd3019Schristos.It 72842bd3019Schristos.Fn dwarf_next_types_section 72942bd3019Schristos.It 73042bd3019Schristos.Fn dwarf_producer_set_isa 7319dd9d0cfSchristos.El 7329dd9d0cfSchristos.Sh SEE ALSO 7339dd9d0cfSchristos.Xr elf 3 7349dd9d0cfSchristos.Sh STANDARDS 7359dd9d0cfSchristosThe DWARF standard is defined by 7369dd9d0cfSchristos.Rs 7379dd9d0cfSchristos.%T "The DWARF Debugging Information Format" 7389dd9d0cfSchristos.%V "Version 4" 7399dd9d0cfSchristos.%O "http://www.dwarfstd.org/" 7409dd9d0cfSchristos.Re 7419dd9d0cfSchristos.Sh HISTORY 7429dd9d0cfSchristosThe DWARF(3) API originated at Silicon Graphics Inc. 7439dd9d0cfSchristos.Pp 7449dd9d0cfSchristosA BSD-licensed implementation of a subset of the API was written by 74542bd3019Schristos.An John Birrell Aq Mt jb@FreeBSD.org 746604b0842Sjkoshyfor the 747604b0842Sjkoshy.Fx 748604b0842Sjkoshyproject. 7499dd9d0cfSchristosThe implementation was subsequently revised and completed by 75042bd3019Schristos.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . 7519dd9d0cfSchristos.Pp 7529dd9d0cfSchristosManual pages for this implementation were written by 75342bd3019Schristos.An Joseph Koshy Aq Mt jkoshy@users.sourceforge.net 7549dd9d0cfSchristosand 75542bd3019Schristos.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . 756