This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils/stabs.c fixes
- To: "Mark E." <snowball3 at bigfoot dot com>, binutils at sources dot redhat dot com
- Subject: Re: binutils/stabs.c fixes
- From: "Steve deRosier" <sderosier at vari-lite dot com>
- Date: Tue, 30 Jan 2001 12:16:00 -0600
Mark,
I found another occurrence of the same stuff that you fixed earlier. It
does fix the problem I was having, but simply by the avoidance of the code
that is causing the problems. Patch tested and works on a
sparc-sun-solaris2.5 host configured for a m68k-coff target.
Thanks,
- Steve
--
Steve deRosier
Embedded Software Engineer
Vari-Lite International, Inc.
===================================================================
binutils/ChangeLog
2001-01-24 Steve deRosier <sderosier@vari-lite.com>
* ieee.c (ieee_add_bb11): Don't check for backslashes
unless HAVE_DOS_BASED_FILE_SYSTEM is defined.
===================================================================
*** binutils-2.10.1/binutils/ieee.c.orig Wed Jan 24 11:09:03 2001
--- binutils-2.10.1/binutils/ieee.c Wed Jan 24 12:02:31 2001
*************** ieee_add_bb11 (info, sec, low, high)
*** 5204,5218 ****
}
else
{
! const char *filename, *modname, *backslash;
char *c, *s;
/* Start the enclosing BB10 block. */
filename = bfd_get_filename (info->abfd);
modname = strrchr (filename, '/');
backslash = strrchr (modname, '\\');
! if (backslash > modname)
modname = backslash;
if (modname != NULL)
++modname;
--- 5204,5223 ----
}
else
{
! const char *filename, *modname;
! #ifdef HAVE_DOS_BASED_FILE_SYSTEM
! const char *backslash;
! #endif
char *c, *s;
/* Start the enclosing BB10 block. */
filename = bfd_get_filename (info->abfd);
modname = strrchr (filename, '/');
+ #ifdef HAVE_DOS_BASED_FILE_SYSTEM
backslash = strrchr (modname, '\\');
! if (modname == NULL || (backslash != NULL && backslash > modname))
modname = backslash;
+ #endif
if (modname != NULL)
++modname;
----------
>From: "Mark E." <snowball3@bigfoot.com>
>To: binutils@sources.redhat.com
>Subject: Re: binutils/stabs.c fixes
>Date: Tue, Jan 23, 2001, 10:23 PM
>
>> 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;