p Argument .Fa dbg should reference a DWARF debug context allocated using .Xr dwarf_init 3 .
p Argument .Fa bytes_in should point to an array of DWARF location expression bytes.
p Argument .Fa bytes_len should specify the number of the location expression bytes to be translated.
p Argument .Fa llbuf should point to a location which will be set to a pointer to a returned .Vt Dwarf_Locdesc descriptor.
p Argument .Fa listlen should point to a location which will hold the number of the .Vt Dwarf_Locdesc descriptors returned. In this case it is always set to 1.
p If argument .Fa err is not .Dv NULL , it will be used to store error information in case of an error.
p Function .Fn dwarf_loclist_from_expr_a is identical to function .Fn dwarf_loclist_from_expr , except that it requires one additional argument .Fa addr_size , which specifies the address size to use when translating the location expression bytes.
p Function .Fn dwarf_loclist_from_expr_b is identical to function .Fn dwarf_loclist_from_expr_a except that it requires two additional arguments for translating the location expression bytes. Argument .Fa offset_size specifies the offset size, and argument .Fa version specifies the DWARF version. These values are required to correctly translate the .Dv DW_OP_GNU_implicit_pointer opcode. .Ss Memory Management The memory area used for the descriptor returned in argument .Fa llbuf is allocated by .Lb libdwarf . When the descriptor is no longer needed, application code should use function .Xr dwarf_dealloc 3 to free the memory area in two steps: l -enum -compact t First, the array of .Vt Dwarf_Loc descriptors pointed to by the .Fa ld_s field of the .Vt Dwarf_Locdesc descriptor should be deallocated using the allocation type .Dv DW_DLA_LOC_BLOCK . t Next, the application should free the .Fa llbuf pointer using the allocation type .Dv DW_DLA_LOCDESC . .El .Sh RETURN VALUES On success, these functions returns .Dv DW_DLV_OK . In case of an error, they return .Dv DW_DLV_ERROR and set the argument .Fa err . .Sh ERRORS These functions may fail with the following errors: l -tag -width ".Bq Er DW_DLE_LOC_EXPR_BAD" t Bq Er DW_DLE_ARGUMENT One of the arguments .Va dbg , .Va bytes_in , .Va llbuf or .Va listlen was .Dv NULL . t Bq Er DW_DLE_ARGUMENT Argument .Fa bytes_len was 0. t Bq Er DW_DLE_ARGUMENT The value of argument .Fa addr_size was invalid. t Bq Er DW_DLE_LOC_EXPR_BAD An unknown or invalid operation was found in the location expression bytes provided in argument .Fa bytes_in . t Bq Er DW_DLE_MEMORY An out of memory condition was encountered during the execution of this function. .El .Sh SEE ALSO .Xr dwarf 3 , .Xr dwarf_dealloc 3 , .Xr dwarf_get_fde_info_for_all_regs3 3 , .Xr dwarf_get_fde_info_for_cfa_reg3 3 , .Xr dwarf_get_fde_info_for_reg3 3 , .Xr dwarf_get_loclist_entry 3 , .Xr dwarf_loclist_n 3