Forums » Programming with the ECS » Intermediate Code »
Minimal possible debug information
Added by Rochus Keller about 1 year ago
I actually just want to know where my application crashes.
For this purpose I added break/loc pairs to all relevant places (by using cdemiter Break).
When I compile, I get tons of "missing source code location" errors from Code::Checker.
A tar.gz with all IR files plus my amd32linuxrun.obf required to build is attached.
What am I doing wrong? As far as I understand the manual, the contraints regarding break and loc are met.
Replies (6)
RE: Minimal possible debug information - Added by Florian Negele about 1 year ago
When a code section contains debugging information like breakpoints, it must also provide a source code location for its own definition as well as a type declaration for the returned result. These requirements are not documented well unfortunately.
RE: Minimal possible debug information - Added by Rochus Keller about 1 year ago
I now added top-level source locations for .code sections and return types (see attached cod files). but I still get "missing type declaration" exceptions from Assembly::Generator::Context called by AMD64::Generator.
RE: Minimal possible debug information - Added by Florian Negele about 1 year ago
This was an oversight in the implementation of the type
instruction with pointer types. The attached patch should fix the issue. Thank you for reporting and sorry for the inconveniences.
type.patch (3.18 KB) type.patch |
RE: Minimal possible debug information - Added by Rochus Keller about 1 year ago
Now it nicely compiles, thank you very much!
I briefly tried to build a cod with the unpatched ecsd -g -v to find out which tools are called, but I get an error from dbgdwarf:
./ecsd -g -v test1.cod ecsd: note: /home/me/Programme/ecs/lib/ecs/tools/cdamd32 test1.cod ecsd: note: /home/me/Programme/ecs/lib/ecs/tools/dbgdwarf test1.dbg test1.dbg: error: invalid debugging information
The cod and the files generated so far are attached.
test1.tar.gz (1.64 KB) test1.tar.gz |
RE: Minimal possible debug information - Added by Florian Negele about 1 year ago
Line and column numbering should start with one.
RE: Minimal possible debug information - Added by Rochus Keller about 1 year ago
Ok, thanks. I used the ECS::Position constructor which appears to set column to zero if no value is provided. Now it works.