I maintain a shared object written in c/c++. I would like to be able to log all calls to the library's methods in order to replay the same sequence of method calls for debug and testing.
I can use ltrace to record all calls to the library but am looking to some tools or library to help replay the trace. I basically just need to parse the trace and call the same functions with the same inputs and do some special handling for the pointers. Here is an example of the trace info after some filtering:
27105 sv_sxp_bfm_CreateSxpMemoryChannelBfm@libsxpbfmall.so(0x1397668, 1, 1, 15) = 0x1a53080
27105 sv_sxp_bfm_ConnectDPICallbacks@libsxpbfmall.so(0x1a53080, 0, 0x1a53080, 1) = 0x2aaaafe4918e
27105 sv_sxp_bfm_GetPhy@libsxpbfmall.so(0x1a53080, 0, 0x1a53080, 1) = 0x1a571a0
27105 sv_sxp_bfm_LoadRegisters@libsxpbfmall.so(0x1a53080, 0, 0x13bb3b0, 0x1a53080) = 6
27105 sv_sxp_bfm_ReadCfg@libsxpbfmall.so(0x1a53080, 0x13913d0, 0x1a53080, 0x13913d0) = 5
27105 sv_sxp_phy_SetTime@libsxpbfmall.so(0x1a571a0, 2500, 0x1a571a0, 2500) = 2500
27105 sv_sxp_phy_SetCLK@libsxpbfmall.so(0x1a571a0, 1, 0x1a571a0, 1) = 1
27105 sv_sxp_phy_SetRst@libsxpbfmall.so(0x1a571a0, 0, 0x1a571a0, 0) = 0
27105 sv_sxp_phy_SetCA@libsxpbfmall.so(0x1a571a0, 0, 0x1a571a0, 0) = 0
27105 sv_sxp_phy_SetSELIN@libsxpbfmall.so(0x1a571a0, 1, 0x1a571a0, 1) = 1
Aucun commentaire:
Enregistrer un commentaire