how to make gcc spit out a mapping from flow graphs to source code line numbers

前端 未结 3 1981
迷失自我
迷失自我 2021-02-08 13:06

Can gcc spit out, given a C file, a list of the all function calls that occur, with filename and line number both for the call itself and for the function\'s declaration?

<
3条回答
  •  心在旅途
    2021-02-08 13:46

    You might try Treehydra, a GCC plugin that gives you read-only access to GCC internal representations of code during compilation. (However, it's a bit of a chore to build, and I'm not sure it'll give better results than -fdump-* for this problem.)

提交回复
热议问题