Opened 6 years ago
Last modified 6 years ago
#5118 accepted enhancement
OMC should generate debug information and PDB files for debugging with Visual Studio
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | normal | Milestone: | Future |
Component: | Code Generation | Version: | |
Keywords: | Cc: |
Description
I had several issues with co-simulation FMUs to be run under Vector CANoe.
Debugging them was not that easy, because I was not able to use Visual Studio, but had to resort to the gdb
binary, which I found in the OpenModelica directory.
Even when working with this, I first had to modify the FMU's Makefile
to generate debug information.
It would be helpful, if there would be a switch to generate debugging information and eventually generating mixed source and (dis)assembler listings.
The debug information should also be made available as PDB files.
https://github.com/rainers/cv2pdb might be helpful for this.
Change History (4)
follow-up: 2 comment:1 by , 6 years ago
comment:2 by , 6 years ago
Replying to adrpo:
omc flag
gendebugsymbols
might help with this, but this one, besides setting-g
flag also builds a Modelica to C source mapping in the generated C files that maybe you don't want. I think we need a flag (or API) to set only the -g. I think setCFlags API will only add to the existing flags.
Neither gendebugsymbols
, nor {{setCFlags}} has an impact regarding -g
.
Is both eventually not working for FMUs?
comment:3 by , 6 years ago
Yeah, that might be the case, they seem to be ignored for the FMUs, I'll have a look.
comment:4 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
omc flag
gendebugsymbols
might help with this, but this one, besides setting-g
flag also builds a Modelica to C source mapping in the generated C files that maybe you don't want. I think we need a flag (or API) to set only the -g. I think setCFlags API will only add to the existing flags.