Watcom debugger with FBC?

DOS specific questions.
Post Reply
danielnice
Posts: 6
Joined: Apr 23, 2018 20:29

Watcom debugger with FBC?

Post by danielnice »

I'm try to find a way to move from MS-BASIC/MASM to FreeBASIC on DOS.
Later, I would like to move again to non-X-Window Linux.

Can the DOS version of Watcom Debugger be made to work with debug output from FreeBASIC?
If so, what options are needed on FBC command-line and what options must be included with WD (or installed)?

The user-interface of WD seems much more similar to CodeView for DOS than GDB and I think it would help get this off the ground faster for me.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Watcom debugger with FBC?

Post by caseih »

EDIT: Probably not. FB uses the DJGPP linker and debug symbol format. See Marcov's response below.
Last edited by caseih on Aug 07, 2018 19:41, edited 2 times in total.
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Watcom debugger with FBC?

Post by marcov »

Afaik Watcom uses the old codeview debug format, while djgpp's go32v2 uses stabs (and maybe later versions DWARF).
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: Watcom debugger with FBC?

Post by rugxulo »

marcov wrote:Afaik Watcom uses the old codeview debug format, while djgpp's go32v2 uses stabs (and maybe later versions DWARF).
I don't remember exactly, check the docs. Maybe CodeView (which?), Watcom (old), or Dwarf (default). But DOS is OMF/OBJ and either MZ or LE .EXEs. DJGPP and derivatives (like FBC), their GDB only supports (non-PE) COFF/MZ with Dwarf2 debug info. I don't think vanilla GCC even supports COFF debug anymore, and the few times DJGPP users need to debug in COFF debug info, they usually use old, stable GCC 3.4.6.

Yeah, it's a mess. BTW, some builds of GDB support --tui for a slightly nicer debugging experience.
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: Watcom debugger with FBC?

Post by rugxulo »

It's probably more complicated than just yes or no. Check the (old) DJGPP FAQ, and make sure to ask for help on the newsgroup:

http://www.delorie.com/djgpp/v2faq/
https://groups.google.com/forum/#!forum ... sdos.djgpp

The latest mini-FAQ (Aug. 4) mentions "gdb-7.11". Hmmm, I haven't kept up either, seems (May 24) announced GDB 8.0.1. I have no idea which version is best to use, but certainly Juan or Andris would know. (I don't remember which version of GDB latest FBC/DOS comes with. I'm on the wrong machine under Linux right now. It's probably something like GDB 6.3.)
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: Watcom debugger with FBC?

Post by rugxulo »

rugxulo wrote:I don't remember which version of GDB latest FBC/DOS comes with. I'm on the wrong machine under Linux right now. It's probably something like GDB 6.3.
fbc.exe -version ("1.05.0 (1-31-2016)")

C:\FB\BIN\DOS\gdb.exe

GDB EXE 4,611,584 01-31-16 10:47a

gdb.exe --version ("7.7.1")

But actually it won't even do that (by default), won't run, aborts! (SIGABRT, "module loading failed")

(This is because it can't find LIBICONV.DXE from LICV114BR2.ZIP ! Hmmm, /current/v2gnu/ only has LICV115B.ZIP nowadays. But I never needed it, so I didn't keep updated.)

FBC 1.05.0 doesn't seem to include LIBICONV.DXE by default. (Should it?)

Presumably a better build of GDB.EXE exists without requiring that. But I don't use this GDB a lot, so I never noticed until recently.
Post Reply