【问题标题】:How to identify implemented code location in open source project binaries?如何识别开源项目二进制文件中实现的代码位置?
【发布时间】:2020-09-17 06:42:22
【问题描述】:

wireshark packet-s7comm.c 中有一个 c 代码,构建后我将如何识别哪个生成的二进制文件正在执行?

【问题讨论】:

  • 你的意思是你需要检测哪个可执行文件或库(在CMake项目中)包含文件packet-s7comm.c
  • 是的,你明白了。

标签: cmake build wireshark wireshark-dissector


【解决方案1】:

packet-s7comm.c 文件应编译到 epan 库中,如 CMake 代码 here 所示:

add_library(epan
    #Included so that Visual Studio can properly put header files in solution
    ${LIBWIRESHARK_HEADER_FILES}

    ${LIBWIRESHARK_FILES}
    $<TARGET_OBJECTS:crypt>
    $<TARGET_OBJECTS:dfilter>
    $<TARGET_OBJECTS:dissectors>
    $<TARGET_OBJECTS:dissectors-corba>
    $<TARGET_OBJECTS:ftypes>
    $<TARGET_OBJECTS:version_info>
    $<TARGET_OBJECTS:wmem>
    $<$<BOOL:${LUA_FOUND}>:$<TARGET_OBJECTS:wslua>>
    ${CMAKE_BINARY_DIR}/image/libwireshark.rc
)

您看不到此处特别包含的packet-s7comm.c 文件,因为它包含在dissectors 对象库目标中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-19
    • 2015-05-26
    • 1970-01-01
    • 2010-10-08
    • 2012-08-21
    • 1970-01-01
    • 2012-02-29
    相关资源
    最近更新 更多