* bitrot in buildsym.c:start_subfile
@ 2002-04-03 21:58 Doug Evans
2002-04-04 5:51 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2002-04-03 21:58 UTC (permalink / raw)
To: gdb
In buildsym.c there's this:
/* Start recording information about source code that came from an
included (or otherwise merged-in) source file with a different
name. NAME is the name of the file (cannot be NULL), DIRNAME is
the directory in which it resides (or NULL if not known). */
void
start_subfile (char *name, char *dirname)
{
`name' cannot be NULL.
However, there's this:
subfile->name = (name == NULL) ? NULL : savestring (name, strlen (name));
and this:
if (subfile->name)
Am I missing something?
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: bitrot in buildsym.c:start_subfile
2002-04-03 21:58 bitrot in buildsym.c:start_subfile Doug Evans
@ 2002-04-04 5:51 ` Andrew Cagney
2002-04-04 10:08 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-04-04 5:51 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb
> In buildsym.c there's this:
>
> /* Start recording information about source code that came from an
> included (or otherwise merged-in) source file with a different
> name. NAME is the name of the file (cannot be NULL), DIRNAME is
> the directory in which it resides (or NULL if not known). */
>
> void
> start_subfile (char *name, char *dirname)
> {
>
>
> `name' cannot be NULL.
>
> However, there's this:
>
> subfile->name = (name == NULL) ? NULL : savestring (name, strlen (name));
>
> and this:
>
> if (subfile->name)
>
> Am I missing something?
Doesn't look like it. Guess the comment is wrong. Any hints from the
callers?
To figure out the full history will mean grubbing around in the old
cygnus repository. It might be easier to track that with a bug report.
enjoy,
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: bitrot in buildsym.c:start_subfile
2002-04-04 5:51 ` Andrew Cagney
@ 2002-04-04 10:08 ` Doug Evans
0 siblings, 0 replies; 3+ messages in thread
From: Doug Evans @ 2002-04-04 10:08 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
Andrew Cagney writes:
> > In buildsym.c there's this:
> >
> > /* Start recording information about source code that came from an
> > included (or otherwise merged-in) source file with a different
> > name. NAME is the name of the file (cannot be NULL), DIRNAME is
> > the directory in which it resides (or NULL if not known). */
>
> Guess the comment is wrong. Any hints from the
> callers?
If name is NULL when subfiles is not-NULL, start_subfile will segv
in FILENAME_CMP [maybe subfiles will always be NULL when name is NULL].
What does it mean for name to be NULL?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-04 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-03 21:58 bitrot in buildsym.c:start_subfile Doug Evans
2002-04-04 5:51 ` Andrew Cagney
2002-04-04 10:08 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox