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: tknodt@… 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)

comment:1 by Adrian Pop, 6 years ago

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.

in reply to:  1 comment:2 by tknodt@…, 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 Adrian Pop, 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 Adrian Pop, 6 years ago

Owner: changed from Lennart Ochel to Adrian Pop
Status: newaccepted
Note: See TracTickets for help on using tickets.