Re: Problem Debugging C Program



John Hanley wrote:
Willem wrote:
John wrote:

I replaced my printf with a simple printf("hello world"). And it
still trips the SIGSEGV at that point.

Any other suggestions?

You may have trashed the stack, or you made a mistake in some
file I/O. (Such as writing to a closed file handle). Hard to
tell without looking at the source.

Check all your memory allocations and deallocations, and also
make sure to add error checking at all your file operations,
especially the open().

Sounds good. In the meantime, here is the code if you have the
time to take a peek at it.

Much too long. Cut it to a complete compilable beast of no more
than 200 lines and publish that, together with the input and
output. You'll probably find the problem yourself by doing this.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: Min raising PF in NL
    ... just that I don't believe game theory has much to say about how to ... So what mistake are we exploiting here? ... stacks after the flop. ... As far as turning deep stack into short stack, ...
    (rec.gambling.poker)
  • Re: Stack overflow..
    ... area then can i get a SIGSEGV signal.. ... read/write then SIGSEGV is raised.. ... but writing to the stack local to the thread.. ... Should the stack grow into this guard page, ...
    (comp.os.linux.development.system)
  • Re: Where to declare Variables
    ... trace) I made a mistake instead of having to search for it myself. ... alrady fixing it while you're still searching. ...
    (comp.lang.php)
  • Re: How to get value
    ... since villian was in the SB. ... with ATC hoping to stack someone with 2 pair, trips against someone ...
    (rec.gambling.poker)
  • Re: Debugging a process received a Signal
    ... my requirement is to get the stack trace.But ... the gdb doesn't allow me to do.Is there any way this can be achieved. ... If you get something weired after a SIGSEGV ... volatile int a; ...
    (comp.os.linux.development.apps)