binutils/stabs.c fixes
Mark E.
snowball3@bigfoot.com
Sat Jan 20 21:21:00 GMT 2001
Hi guys,
I was reading through archive and noticed there was another bug in
binutils/stabs.c that needed to be fixed. This patch incorporates Ian's
suggested fix. But since gcc has no way to generate N_WARNING stabs it seems,
the patch should probably first be tested by the person who reported the bug.
Thanks,
Mark
binutils/ChangeLog:
2001-01-21 Mark Elbrecht <snowball3@bigfoot.com>
* stabs.c: Update copyright. Include "filenames.h".
* stabs.c (parse_stab): Use IS_ABSOLUTE_PATH. Ignore N_WARNING stabs.
Index: stabs.c
===================================================================
RCS file: /cvs/src/src/binutils/stabs.c,v
retrieving revision 1.6
diff -c -p -r1.6 stabs.c
*** stabs.c 2000/07/10 14:51:04 1.6
--- stabs.c 2001/01/21 04:36:27
***************
*** 1,5 ****
/* stabs.c -- Parse stabs debugging information
! Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
--- 1,6 ----
/* stabs.c -- Parse stabs debugging information
! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000,
! 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
***************
*** 33,38 ****
--- 34,40 ----
#include "demangle.h"
#include "debug.h"
#include "budbg.h"
+ #include "filenames.h"
/* Meaningless definition needs by aout64.h. FIXME. */
#define BYTES_IN_WORD 4
***************
*** 40,53 ****
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
- #ifndef DIR_SEPARATOR
- #ifdef _WIN32
- #define DIR_SEPARATOR '\\'
- #else
- #define DIR_SEPARATOR '/'
- #endif
- #endif
-
/* The number of predefined XCOFF types. */
#define XCOFF_TYPE_COUNT 34
--- 42,47 ----
*************** parse_stab (dhandle, handle, type, desc,
*** 568,579 ****
f = info->so_string;
! if ( (string[0] == '/')
! || (string[0] == DIR_SEPARATOR)
! || ( (DIR_SEPARATOR == '\\')
! && (string[1] == ':')
! && ( (string[2] == DIR_SEPARATOR)
! || (string[2] == '/'))))
info->so_string = xstrdup (string);
else
info->so_string = concat (info->so_string, string,
--- 562,568 ----
f = info->so_string;
! if (IS_ABSOLUTE_PATH (string))
info->so_string = xstrdup (string);
else
info->so_string = concat (info->so_string, string,
*************** parse_stab (dhandle, handle, type, desc,
*** 706,711 ****
--- 695,701 ----
case N_OBJ:
case N_ENDM:
case N_MAIN:
+ case N_WARNING:
break;
}
More information about the Binutils
mailing list