[RFC] readelf -w/-debug-dump= association

Alan Modra amodra@gmail.com
Thu May 27 03:15:04 GMT 2021


I'm soliciting opinions on this change to readelf --help, which I
think is good but I might be a little too familiar with readelf to
judge well.

The idea is to make it a little easier to learn, for example, that -wo
is shorthand for --debug-dump=loc.  Also to ensure that people adding
new --debug-dump= options put the associated -w option in the correct
place.

	* readelf.c (usage): Associate -w and --debug-dump options closely.

diff --git a/binutils/readelf.c b/binutils/readelf.c
index a6ed24c03bd..9844a9229c3 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4653,10 +4653,10 @@ usage (FILE * stream)
   -R --relocated-dump=<number|name>\n\
                          Dump the contents of section <number|name> as relocated bytes\n\
   -z --decompress        Decompress section before dumping it\n\
-  -w[lLiaprmfFsOoRtgUuTAc] or\n\
-  --debug-dump=[rawline,decodedline,info,abbrev,pubnames,aranges,macro,frames,\n\
-                frames-interp,str,str-offsets,loc,Ranges,pubtypes,gdb_index,\n\
-                trace_info,trace_abbrev,trace_aranges,addr,cu_index]\n\
+  -w/--debug-dump=[a/abbrev, A/addr, r/aranges, c/cu_index, L/decodedline,\n\
+                   f/frames, F/frames-interp, g/gdb_index, i/info, o/loc,\n\
+                   m/macro, p/pubnames, t/pubtypes, R/Ranges, l/rawline, s/str\n\
+                   O/str-offsets, u/trace_abbrev, T/trace_aranges, U/trace_info]\n\
                          Display the contents of DWARF debug sections\n\
   -wk,--debug-dump=links Display the contents of sections that link to separate debuginfo files\n\
   -P,--process-links     Display the contents of non-debug sections in separate debuginfo files.  (Implies -wK)\n"));

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list