MCPcopy Index your code
hub / github.com/DerekSelander/LLDB / generate_option_parser

Function generate_option_parser

lldb_commands/jtool.py:188–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187
188def generate_option_parser():
189 usage = "usage: %prog [options] TODO Description Here :]"
190 parser = optparse.OptionParser(usage=usage, prog="jtool", add_help_option=False)
191 # parser.add_option("-m",
192 # action="store_true",
193 # default=None,
194 # dest="module",
195 # help="This is a placeholder option to show you how to use options with strings")
196 parser.add_option("-h", "--opt_h",
197 action="store_true",
198 default=False,
199 dest="opt_h",
200 help="print header (ELF or Mach-O)")
201 parser.add_option("-f", "--opt_f",
202 action="store_true",
203 default=False,
204 dest="opt_f",
205 help="print fat header")
206 parser.add_option("-l", "--opt_l",
207 action="store_true",
208 default=False,
209 dest="opt_l",
210 help="List sections/commands in binary")
211 parser.add_option("-L", "--opt_L",
212 action="store_true",
213 default=False,
214 dest="opt_L",
215 help="List shared libraries used (like LDD)")
216 parser.add_option("-S", "--opt_S",
217 action="store_true",
218 default=False,
219 dest="opt_S",
220 help="List Symbols (like NM)")
221
222
223 parser.add_option("", "--pages",
224 action="store_true",
225 default=False,
226 dest="opt_pages",
227 help="Show file page map (similar to pagestuff(1))")
228
229 # *********************************************************************
230 # dyldinfo Compatible Options:
231 # *********************************************************************
232 # parser.add_option("", "--bind",
233 # action="store_true",
234 # default=False,
235 # dest="opt_bind",
236 # help="print addresses dyld will set based on symbolic lookups")
237
238 parser.add_option("-G", "--debug",
239 action="store_true",
240 default=False,
241 dest="debug",
242 help="Used for debugging the generated jtool script")
243 return parser
244
245

Callers 1

handle_commandFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…