Mail Archives: djgpp/1999/07/17/07:03:20

Sender: richdawe AT bigfoot DOT com
Message-ID: <>
Date: Sat, 17 Jul 1999 11:59:42 +0000
From: Richard Dawe <richdawe AT bigfoot DOT com>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.10 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: DJGPP newsgroup <djgpp AT delorie DOT com>
Subject: Bizarre debugging format problem
Reply-To: djgpp AT delorie DOT com


While trying to build and debug a program yesterday, I experienced a
strange problem with the debugging information. I compiled & linked with
gcc's -g flag, but gdb could not find the line number information for any
of the functions. I tried changing -g to -g3, but this made no difference.
Trying -ggdb allowed me to do 'l main' and similar successfully. Why is

I couldn't see what I was doing wrong, because all my other programs use
-g to add debug info! I don't know if this is relevant, but the source
code, httpsync.c, is ~48K.

Here is the Makefile, with -g changed to -ggdb:

# Makefile for httpsync
# Written by Richard Dawe <richdawe AT bigfoot DOT com>

CFLAGS  = -Wall -ggdb -I../lsck/include
LDFLAGS = -ggdb -L../lsck/lib
LIBS    = -lsocket

httpsync:       httpsync.o
        $(CC) $(LDFLAGS) -o $@ $< $(LIBS)

%.o:    %.c
        $(CC) $(CFLAGS) -c $<

[ BTW: libsocket is installed in the directory specified by the -I & -L
options. ]

Please reply by mail too, because I do not have newsgroup access right

Bye, yours confusedly,

 Richard Dawe | richdawe AT bigfoot DOT com | 

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019