Lattice C - Source level debugging?

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
arf
Captain Atari
Captain Atari
Posts: 211
Joined: Thu May 17, 2012 9:56 pm
Location: Germany

Lattice C - Source level debugging?

Post by arf »

Hi,

I’d like to inspect the generated machine language code from a compilation with Lattice C 5.6. In PureC (which I’m familiar with), I’d add debug information to the compiler&linker options, and feed it into Pure Debugger. There I’d see the C source code intermangled with assembler – perfect.

I’d like to have something similar with Lattice C. I read the FM, and added options like "load source code" for MonST, but always get 'raw' assembler directives in MonST only – no source lines, not even symbols. What am I doing wrong here?

Alternatively it’d be great to ask the compiler to output assembler as a text listing, gcc does it with -S. I only made it to the point to get the C source been output’ed, but no assembler.
arf
Captain Atari
Captain Atari
Posts: 211
Joined: Thu May 17, 2012 9:56 pm
Location: Germany

Re: Lattice C - Source level debugging?

Post by arf »

Bump? Could it be that it’s not possible in the end?
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Lattice C - Source level debugging?

Post by ijor »

I'm not really very familiar with Lattice C and I haven't used it for a very long time. I am just answering because so far, nobody else did

As far as I can remember Lattice C doesn't have a source level debugger. So whatever you could do with MonST is rather limited. You do can load symbols with MonST for assembler sources, so I guess it should work with C sources as well. But can't say for sure. I would double check all the compiler and linker option for debug are enabled indeed.

Most people don't use Lattice nowadays, so it might be difficult to find an expert answer, I'm afraid.
Fx Cast: Atari St cycle accurate fpga core
neanderthal
Captain Atari
Captain Atari
Posts: 164
Joined: Sun Jul 10, 2016 10:58 pm

Re: Lattice C - Source level debugging?

Post by neanderthal »

Hmm,,think i monst:d some higher-level stuff..Gotta yank my memory.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2177
Joined: Sun Jul 31, 2011 1:11 pm

Re: Lattice C - Source level debugging?

Post by Eero Tamminen »

Does lattice have any option for DRI / GST symbols generation? If those are included to binaries, debuggers can show the symbols (e.g. Hatari debugger loads them automatically when it's entered while program started from GEMDOS HD is still running).
neanderthal
Captain Atari
Captain Atari
Posts: 164
Joined: Sun Jul 10, 2016 10:58 pm

Re: Lattice C - Source level debugging?

Post by neanderthal »

Well that was a bit of fun down memory lane,not what I remembered of course but to get old Lattice C to pass down the
rudimentary own calls.
I ticked in the box in Options/Linker/Add exported symbols.
And got it to show in monst ___start and _main and all the other lovely stuff it does for the standard simple printf() program.
neanderthal
Captain Atari
Captain Atari
Posts: 164
Joined: Sun Jul 10, 2016 10:58 pm

Re: Lattice C - Source level debugging?

Post by neanderthal »

Not really C source code of course but one can trail a bit more than raw assembly.So pure C has more proper approach to this? Gotta check out,Iam more of a low-level dude otherwise.
Post Reply

Return to “C / PASCAL etc.”