cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/19/04:58:48

From: Robrecht Jacques <jacques AT esat DOT kuleuven DOT ac DOT be>
Newsgroups: comp.os.msdos.djgpp
Subject: GDB gives segfaults when stopping at breakpoints
Date: 18 Mar 1997 19:49:35 +0100
Organization: K.U.Leuven
Lines: 40
Sender: jacques AT flaubert
Message-ID: <wr5wwr55934.fsf@esat.kuleuven.ac.be>
NNTP-Posting-Host: flaubert.esat.kuleuven.ac.be
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

I just installed DJGPP2.0 (binaries) on my Dos6.2/Win3.1
system and was able to compile/link/etc... but when I
runned GDB to debug the programs it gives segfaults.
Eg compiling this program:

#include <stdio.h>
int main () {
  printf ("I am in the main-function\n");
  return (0);
}

with
 djgpp -g -o foo foo.c
and running
 gdb foo

(gdb) break main
Breakpoint 1 at foo.c:3
(gdb) run

will stop at line 3 but gives an SEGMENTATION FAULT
(that is: gdb does not crash but says the program will
cause a segfault at that position). If I don't put any
breakpoints it will run without problems.
(sorry I can't give the correct error, because I am not
at home now)

Did I forget to install something? Am I missing
something? I read the faq, but didn't find anything.
Maybe I should use another debugger (though I am
very familiar with GDB because I use it at work on a
UNIX machine) ? Any suggestions?

Thanks,
Robrecht
-- 
Robrecht DOT Jacques AT esat DOT kuleuven DOT ac DOT be

- Raw text -


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