This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/258: SIGSEGV error only in gdb, not outside; File pointer garbled by gdb.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 15 Dec 2001 01:28:00 -0000
- Subject: Re: gdb/258: SIGSEGV error only in gdb, not outside; File pointer garbled by gdb.
- Reply-to: Andrew Cagney <ac131313 at cygnus dot com>
The following reply was made to PR gdb/258; it has been noted by GNATS.
From: Andrew Cagney <ac131313@cygnus.com>
To: jstoffels@xs4all.nl
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/258: SIGSEGV error only in gdb, not outside; File pointer garbled by gdb.
Date: Fri, 14 Dec 2001 20:22:01 -0500
> Windows 98, Pentium 3, cygwin
>
>>Description:
>
> I read a datastructure from an ASCII file from a file pointer to the input file, then copy it to stdout. Outside gdb this works fine. I pass the FILE * down through several functions.
> When I include an object file I do not refer to, an error occurs later in gdb; By the way, the object file needs -lcurses and the loader warns about resolving COLS, LINES and stdscr to some other symbols.
> When I run the program with the unused object file from the command line, no problem occurs.
> When I run it inside gdb I get a SIGSEGV, and my FILE * value has changed through the stack. High up it is allright, at the crash site the FILE * has become nonsense, clearly causing the SIGSEGV on usage of the FILE *.
> Has anyone a suggestion how to track the problem further?
>
>>How-To-Repeat:
>
> I just hope someone can give me a hint for the hunt at least?
Could I just suggest including a transcript of the GDB session? That
way, whoever gets to look at this has an example to follow.
Andrew