HaxeFoundation / HaxeFoundation/hxcpp
Docs give the wrong hxcpp flag for debug symbol generation
- Dominant language
- C++
- Stars
- 330
- Forks
- 227
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 18
Description
I'm trying to compile a Haxe library I'm writing with hxcpp so I can debug it. I would try debugging it as JavaScript, but it relies on the `sys` package so that's not trivial.
The problem is that the binary hxcpp comes up with is missing debug symbols according to gdb. I'm building it with the following `hxml` file:
```
-lib hscript
-lib utest
-main tests.TestMain
-cpp cpp
```
And the following steps:
```
haxe debug.hxml -D no-compilation
cd cpp
haxelib run hxcpp Build.xml -DHXCPP_DEBUGGER -DHXCPP_DEBUG_LINK
```
After investigating in the source myself, it seems the culprit might be that the `-g` flag is never referenced in `gcc-toolchain.xml`:
https://github.com/HaxeFoundation/hxcpp/blob/ff463f43bd5f85c042f0f05e73508b15537579f9/toolchain/gcc-toolchain.xml#L40
I'll investigate locally by building from source, and if I'm right, I should be able to PR this.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.