Re: [Question] Segmentation fault

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 04/16/01


Dust wrote:
>
> (gdb) print argc
> $1 = 3
> (gdb) print pos
> $2 = 2
> (gdb) print argv[pos]
> $3 = 0xbfbffcd6 "9991"

Hrmmm, all the variables look good here.  The only thing I can possibly
think is that the function pointer for atoi is being overwritten (just as
I believe it might have been for exit).  Either that or the code has been
overwritten itself.  Let's take a look at the former possibility...

(gdb) frame 2
(gdb) print atoi
(gdb) break main
(gdb) run
(gdb) print atoi

Let's see what that shows.

Regards, Peter

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/05/01 PST