Re: Problem Debugging C Program



John Hanley wrote:

I have a linked list. I am reading in data from a text file, storing the
data in a linked list, and printing out the linked list.

I step through the program with GDB/DDD and everything seems to get
parsed and stored correctly. Even when I print out my linked list, just
before my printf statement I check the values in my list node and the
values are fine. When I execute the printf, I get a SIGSEGV. I did a
'where' in GDB and got this:

.... snip ...

I am not sure what argv has to do with anything. Does anyone have any
suggestions as to where I can start looking for this problem?

Insufficient information. Give complete code. You have made an
error somewhere. Check the list is always properly terminated,
etc.

--
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: How to get number of digits in int variable?
    ... > I'm trying to write a printf statement that sets the field width when ... > printing a number. ... > Can anyone suggest how I might get the number of digits for a numeric ... Prev by Date: ...
    (comp.lang.c)
  • How to get number of digits in int variable?
    ... I'm trying to write a printf statement that sets the field width when ... printing a number. ... Can anyone suggest how I might get the number of digits for a numeric ... Prev by Date: ...
    (comp.lang.c)
  • Re: z error
    ... one for retrieving a value and one for storing a value in it. ... So let's move the subexpression out of the printf statement, ...
    (comp.lang.c)