c - How to emit debug information using llvm ir in Clang?
问题描述
Using clang or clang++ the command of
clang -S -emit-llvm ./source.c
will create a llvm ir document. However debugging information is missing. So when you test and compile things you lose debugging information.
How does one can make clang emit human readable llvm ir document with debug information ?
解决方案
添加调试信息的标准选项是-g
. 所以,运行clang -g -S -emit-llvm source.c
会发出必要的信息
推荐阅读
- c++ - C++中选择和迭代语句内的类型转换过程
- node.js - 在某些条件下使用 xmlbuilder 时,结束标记放错了位置
- python - 如何使用 selenium 在 li 中获取 a 标签
- jmeter - 如何并行运行线程
- c# - 智能家居报告状态SYNC新设备| 未找到请求的实体。[404]
- http - 即使 gin 的 Context 结构将 Header 作为 Map 也无法获取 Map 的键
- javascript - Visual Studio 将 JavaScript 解释为导致错误的 C#
- python - Python - 映射两个列表(不同大小)?
- c# - C# 使用 Polly Retry 重试两个查询
- r - 在R中设置等效于.subset2?