DWARF_GET_ARANGE(3)
β¨ NAME β¨
dwarf_get_arange β retrieve the address range descriptor for an address.
okay so this is DWARF_GET_ARANGE(3), from the Library Functions Manual, and it is literally the page for finding which address range descriptor covers an address πβ¨
π LIBRARY π
DWARF Access Library (libdwarf, -ldwarf) β yes bestie, that's the one π«Ά
π οΈ SYNOPSIS π οΈ
#include <libdwarf.h>
int
dwarf_get_arange(Dwarf_Arange *ar_list, Dwarf_Unsigned ar_cnt,
Dwarf_Addr addr, Dwarf_Arange *ret_ar, Dwarf_Error *err);
π DESCRIPTION π
Function dwarf_get_arange() searches an array of Dwarf_Arange descriptors for one that covers a given address. main character behavior honestly π
Argument ar_list should point to an array of Dwarf_Arange descriptors. It's giving βhere is the rosterβ energy.
Argument ar_cnt specifies the number of Dwarf_Arange descriptors in the array pointed to by argument ar_list. So yeah, count your entries bestie.
Argument addr specifies the address being looked up. The address in question, the one we're vibe-checking β¨
Argument ret_ar will be used to store the Dwarf_Arange descriptor that covers the given address. That's the winner that gets saved π
If argument err is not NULL, it will be used to store error information in case of an error. Very βif something goes wrong, write it downβ of it.
π RETURN VALUES π
Function dwarf_get_arange() returns DW_DLV_OK when it succeeds. slay β
It returns DW_DLV_NO_ENTRY if there is no Dwarf_Arange descriptor that covers the provided address. like, nothing matched, no cap π
In case of an error, it returns DW_DLV_ERROR and sets the argument err. so dramatic, but fair π
π¨ ERRORS π¨
Function dwarf_get_arange() can fail with:
[DW_DLE_ARGUMENT]β One of the argumentsdbg,ar_listorret_arwasNULL.[DW_DLE_ARGUMENT]β Value of argumentar_cntequals to0.[DW_DLE_NO_ENTRY]β ADwarf_Arangedescriptor that covers the given address was not found.
bestie, please note those two[DW_DLE_ARGUMENT]entries are both real and both listed β one for theNULLsituation and one forar_cntbeing0π«Ά
π SEE ALSO π
dwarf(3)dwarf_get_arange_cu_header_offset(3)dwarf_get_arange_info(3)dwarf_get_aranges(3)dwarf_get_cu_die_offset(3)
This page was brought to you by Debian, dated April 16, 2011 β mwah, enjoy the address-range hunt bestie ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: libdwarf 15.0.0
- Copyright (c) 2011 Kai Wang
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms