Skip to content

Commit 35ce243

Browse files
committed
Changed REPEAT_BRIEF to NO to avoid duplicate reporting
of such in the examples. modified: doc/Doxyfile Very small wording changes in the Dwarf_Error overview. modified: doc/libdwarf.dox Regenerated. modified: doc/libdwarf.pdf
1 parent 335bd73 commit 35ce243

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

doc/Doxyfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ BRIEF_MEMBER_DESC = YES
107107
# brief descriptions will be completely suppressed.
108108
# The default value is: YES.
109109

110-
REPEAT_BRIEF = YES
110+
# Set NO by davea 12 march 2024 to avoid duplicated brief in examples output.
111+
REPEAT_BRIEF = NO
111112

112113
# This tag implements a quasi-intelligent brief description abbreviator that is
113114
# used to form the text in various listings. Each string in this list, if found

doc/libdwarf.dox

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,13 @@
206206
@endcode
207207
and pass bad_dw_errhandler (as a function pointer,
208208
no parentheses).
209-
The Dwarf_Ptr argument is the value you passed in as dw_errarg,
210-
and can be anything.
209+
210+
The Dwarf_Ptr argument your error handler
211+
function receives is the value you passed in as dw_errarg,
212+
and can be anything, it allows you to associate
213+
the callback with a particular dwarf_init* call
214+
if you wish to make such an association.
215+
211216
By doing an exit() you guarantee that your application
212217
abruptly stops. This is only acceptable in toy
213218
or practice programs.
@@ -227,10 +232,10 @@
227232
because it returns rather than exiting.
228233
It is not ideal. The DW_DLV_ERROR code
229234
is returned from @e libdwarf and your code
230-
can do what it likes with the error situation, but
231-
the library will continue from the error and
235+
can do what it likes with the error situation.
236+
The library will continue from the error and
232237
will return an error code on returning to your
233-
libdwarf call but the calling function will not
238+
libdwarf call ... but the calling function will not
234239
know what the error was.
235240

236241
@code
@@ -243,8 +248,8 @@
243248

244249
@subsection dw_errorcall Error Handling Everywhere
245250

246-
So let us examine a case where anything could
247-
happen. And here we are taking the
251+
So let us examine a simple case where anything could
252+
happen. We are taking the
248253
<b>recommended A)</b>
249254
method of using a non-null Dwarf_Error*:
250255

@@ -255,11 +260,15 @@
255260

256261
res = dwarf_siblingof_c(die,&newdie,error);
257262
if (res != DW_DLV_OK) {
263+
/* Whether DW_DLV_ERROR or DW_DLV_NO_ENTRY
264+
(the latter is actually impossible
265+
for this function) returning res is the
266+
appropriate default thing to do. */
258267
return res;
259268
}
260269
/* Do something with newdie. */
261270
dwarf_dealloc_die(newdie);
262-
newdie = 0;
271+
newdie = 0; /* A good habit... */
263272
return DW_DLV_OK;
264273
}
265274
@endcode
@@ -297,6 +306,10 @@
297306
char * msg = dwarf_errmsg(*error);
298307
@endcode
299308
or both and report that somehow.
309+
310+
The above three values are the only returns possible
311+
from the great majority of @e libdwarf functions, and
312+
for these functions the return type is always @b int .
300313

301314
If it is a decently large
302315
or long-running program then you want to

doc/libdwarf.pdf

-19.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)