Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file read_symbols_main.ml
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859openBap_knowledgeopenCore_kernelopenRegular.StdopenBap_future.StdopenBap.StdincludeSelf()letextractnamearch=letblk_of_sexpx=[%of_sexp:string*int64*int64]xinletwidth=Arch.addr_sizearch|>Size.in_bitsinletaddr=Addr.of_int64~widthinIn_channel.with_filename~f:(funch->Sexp.input_sexpsch|>List.map~f:blk_of_sexp|>List.map~f:(fun(n,s,e)->n,addrs,addre))moduletypeTarget=sigtypetvalof_blocks:(string*addr*addr)seq->tvalprovide:Knowledge.agent->t->unitendletagent=letreliability=Knowledge.Agent.authorativeinKnowledge.Agent.register~package:"bap.std"~reliability"user-symbolizer"~desc:"reads symbols from the user provided file"letregistersyms=letprovide(moduleT:Target)=Stream.observeProject.Info.arch(funarch->extractsymsarch|>Seq.of_list|>T.of_blocks|>T.provideagent)inprovide(modulestructincludeRooterletprovide_s=providesend);provide(moduleSymbolizer)let()=let()=Config.manpage[`S"DESCRIPTION";`P"Read symbol information from a file and provide rooter,
symbolizer and a reconstructor, based on this information. Once
symbols are read, use $(b,--)$(i,SERVICE)=$(b,file) to use them.
where $(i,SERVICE) is one of $(b,rooter), $(b,symbolizer) or $(b,reconstructor).
";`S"SEE ALSO";`P"$(b,bap-plugin-objdump)(1), $(b,bap-plugin-byteweight)(1), $(b,bap-plugin-ida)(1)";]inletsymsfile=Config.(param(somenon_dir_file)"from"~docv:"SYMS"~doc:"Use this file as symbols source")inConfig.when_ready(fun{Config.get=(!)}->match!symsfilewith|Somefile->registerfile|None->())