我维护一个用c / c ++编写的共享对象。我希望能够记录对库方法的所有调用,以便重放调试和测试的相同方法调用序列。
我可以使用ltrace记录对库的所有调用,但我正在寻找一些工具或库来帮助重放跟踪。我基本上只需要解析跟踪并使用相同的输入调用相同的函数,并对指针进行一些特殊处理。以下是一些过滤后跟踪信息的示例:
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