Re: [Question] Segmentation fault

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


Dust wrote:
>
> (gdb) print atoi
> $1 = {<text variable, no debug info>} 0x281a9ccc <atoi>
...
> (gdb) print atoi
> $2 = {<text variable, no debug info>} 0x281a9ccc <atoi>

Okay, it's the same at program start and after the seg-fault.  That means
that it's not getting overwritten (which is bad news because it means we
still don't know what the problem is).  At this point I would say the
only possibility left (at least that I can think of) is that the code
space itself is getting overwritten.  To verify this you need a
disassembly dump before and after the seg fault.  Try this...

(gdb) disassemble 0x281a9d3f
(gdb) break main
(gdb) run
(gdb) disassemble 0x281a9d3f

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