This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils/stabs.c fixes
- To: binutils at sources dot redhat dot com
- Subject: Re: binutils/stabs.c fixes
- From: "Mark E." <snowball3 at bigfoot dot com>
- Date: Tue, 23 Jan 2001 23:23:15 -0500
- References: <200101231932.NAA05661@ferret.vlint.com>
> On Tue, 23 Jan 2001, Steve deRosier wrote:
>
> > it segfaults in ieee.c ieee_start_compilation_unit line 4943 during the call
> > to strrchr.
I do see one problem. Backslashes shouldn't be checked for unless using the
host is dos/win32/etc. Unfortunately I don't think it will help the problem
at hand. Patch tested with dos.
binutils/ChangeLog
2001-01-23 Mark Elbrecht <snowball3@bigfoot.com>
* ieee.c: Update copyright.
* ieee.c (ieee_start_compilation_unit): Don't check for backslashes
unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
Index: src/binutils/ieee.c
===================================================================
RCS file: /cvs/src/src/binutils/ieee.c,v
retrieving revision 1.5
diff -c -p -r1.5 ieee.c
*** ieee.c 2000/06/20 12:33:20 1.5
--- ieee.c 2001/01/24 04:03:42
***************
*** 1,5 ****
/* ieee.c -- Read and write IEEE-695 debugging information.
! Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
--- 1,5 ----
/* ieee.c -- Read and write IEEE-695 debugging information.
! Copyright (C) 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
*************** ieee_start_compilation_unit (p, filename
*** 4927,4933 ****
--- 4927,4935 ----
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *modname;
+ #ifdef HAVE_DOS_BASED_FILE_SYSTEM
const char *backslash;
+ #endif
char *c, *s;
unsigned int nindx;
*************** ieee_start_compilation_unit (p, filename
*** 4939,4948 ****
--- 4941,4952 ----
info->filename = filename;
modname = strrchr (filename, '/');
+ #ifdef HAVE_DOS_BASED_FILE_SYSTEM
/* We could have a mixed forward/back slash case. */
backslash = strrchr (filename, '\\');
if (modname == NULL || (backslash != NULL && backslash > modname))
modname = backslash;
+ #endif
if (modname != NULL)
++modname;