Skip to content

Commit 80249f4

Browse files
committed
Small spelling corrections and wording
changes. modified: libdwarf.dox modified: ../src/lib/libdwarf/libdwarf.h
1 parent 5ad97c9 commit 80249f4

File tree

2 files changed

+63
-2
lines changed

2 files changed

+63
-2
lines changed

doc/libdwarf.dox

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@
755755
dwarfdump output.
756756

757757
Sections that are part of an Elf COMDAT GROUP are
758-
asigned a group number > 2. There can be many
758+
assigned a group number > 2. There can be many
759759
such COMDAT groups in an object file (but none
760760
in an executable or shared object). Each such
761761
COMDAT group will have a small set of sections
@@ -967,6 +967,33 @@
967967

968968
We list these with newest first.
969969

970+
<b>Changes 0.8.0 to 0.8.1</b>
971+
972+
Changes were required to support Mach-O universal binaries,
973+
which were not readable by earlier versions of the library.
974+
975+
We have new library functions
976+
dwarf_init_path_a(),
977+
dwarf_init_path_dl_a(), and
978+
dwarf_get_universalbinary_count().
979+
980+
The first two allow a caller to specify which
981+
(numbering from zero) object file to
982+
report on by adding a new argument dw_universalnumber.
983+
Passing zero as the dw_universalnumber argument
984+
is always safe.
985+
986+
The third lets callers retrieve the number
987+
being used.
988+
989+
These new calls do not replace anything so existing
990+
code should work fine. Applying the previously
991+
existing calls dwarf_init_path() dwarf_init_path_dl()
992+
to a Mach-O universal binary works, but the library
993+
will return data on the first (index zero)
994+
as a default since there is no dw_universalnumber
995+
argument possible.
996+
970997
<b>Changes 0.7.0 to 0.8.0</b>
971998

972999
v0.8.0 released 2023-09-20
@@ -1107,7 +1134,7 @@
11071134
DWARF would, in 0.5.0 and earlier, result in
11081135
libdwarf reporting erroneous data. A copy-paste
11091136
error in libdwarf/dwarf_util.c was noticed
1110-
and fixed 24 Januarly 2023 for 0.6.0.
1137+
and fixed 24 January 2023 for 0.6.0.
11111138
Bug <b>DW202301-001</b>.
11121139

11131140
<b>Changes 0.4.2 to 0.5.0</b>

src/lib/libdwarf/libdwarf.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,10 @@ typedef struct Dwarf_Rnglists_Head_s * Dwarf_Rnglists_Head;
14051405
/*! @brief Initialization based on path, the most common
14061406
initialization.
14071407
1408+
On a Mach-O universal binary this function can
1409+
only return information about the first (zero index)
1410+
object in the universal binary.
1411+
14081412
@param dw_path
14091413
Pass in the path to the object file to open.
14101414
@param dw_true_path_out_buffer
@@ -1450,6 +1454,8 @@ typedef struct Dwarf_Rnglists_Head_s * Dwarf_Rnglists_Head;
14501454
@see dwarf_init_path_dl dwarf_init_b
14511455
@see exampleinit
14521456
*/
1457+
1458+
14531459
DW_API int dwarf_init_path(const char * dw_path,
14541460
char * dw_true_path_out_buffer,
14551461
unsigned int dw_true_path_bufferlen,
@@ -1459,6 +1465,18 @@ DW_API int dwarf_init_path(const char * dw_path,
14591465
Dwarf_Debug* dw_dbg,
14601466
Dwarf_Error* dw_error);
14611467

1468+
/*! @brief Initialization based on path
1469+
1470+
This identical to dwarf_init_path() except that it
1471+
adds a new argument, dw_universalnumber,
1472+
with which you can specify which object in
1473+
a Mach-O universal binary you wish to open.
1474+
1475+
It is always safe and appropriate to pass
1476+
zero as the dw_universalnumber.
1477+
Elf and PE and (non-universal) Mach-O object
1478+
files ignore the value of dw_universalnumber.
1479+
*/
14621480
DW_API int dwarf_init_path_a(const char * dw_path,
14631481
char * dw_true_path_out_buffer,
14641482
unsigned int dw_true_path_bufferlen,
@@ -1537,6 +1555,22 @@ DW_API int dwarf_init_path_dl(const char * dw_path,
15371555
unsigned char * dw_dl_path_source,
15381556
Dwarf_Error* dw_error);
15391557

1558+
/*! @brief Initialization based on path with debuglink
1559+
1560+
This identical to dwarf_init_path_dl() except that it
1561+
adds a new argument, dw_universalnumber,
1562+
with which you can specify which object in
1563+
a Mach-O universal binary you wish to open.
1564+
1565+
It is always safe and appropriate to pass
1566+
zero as the dw_universalnumber.
1567+
Elf and PE and (non-universal) Mach-O object
1568+
files ignore the value of dw_universalnumber.
1569+
1570+
Mach-O objects do not contain or use debuglink
1571+
data.
1572+
*/
1573+
15401574
DW_API int dwarf_init_path_dl_a(const char * dw_path,
15411575
char * dw_true_path_out_buffer,
15421576
unsigned int dw_true_path_bufferlen,

0 commit comments

Comments
 (0)