delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/20/11:22:32

Date: Sun, 20 Aug 1995 10:39:59 -0400
To: djgpp AT sun DOT soe DOT clarkson DOT edu
From: egley AT albany DOT net (Skip Egley)
Subject: gdb bombs

I'm trying to learn how to use the gdb debugger.
The program that I'm using to learn gdb runs OK now, I just want to learn gdb.

I've compiled with -g
I use gdb-dpmi (I ran go32 without arguments to verify this is what I should
be using).

When I type:
go32 -d gdb-dpmi filename input_filename
everything starts up OK, I get some messages about GDB, and I get the following:
"... Copyright 1994 Free Software Foundation, Inc...Segmentation violation
in pointer 0x000cc004 at df:85a77
eax=000c3f000...
and a bunch of other stuff (I'm hoping I don't need to type in all this
other stuff).

My executable wants an input_filename and I remember reading in the FAQ
about GDB not being able to handle input arguments.  Sorry if this is
obvious to everyone else, but I'm not an expert programmer.  Does this mean
I can't debug programs that make use of argc and argv in the main call?  Or
is there some other problem with my use of gdb.  Since the program runs
fine, it's either got to be my use of gdb, or I can't depend on argc and
argv when debugging, and I'm not quite sure of which it is.  I guess I'm in
disbelief that debuggers can't handle argc and argv.

Thanks,
Skip Egley

- Raw text -


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