Fix cygwin32 hosted dwarf2 target problem with line number info.
* dwarf2out.c (size_of_string): Do count backslashes. From-SVN: r20562
This commit is contained in:
parent
ce56e6ed02
commit
243e7835fb
@ -1,3 +1,7 @@
|
|||||||
|
Thu Jun 18 18:16:01 1998 Jim Wilson <wilson@cygnus.com>
|
||||||
|
|
||||||
|
* dwarf2out.c (size_of_string): Do count backslashes.
|
||||||
|
|
||||||
Thu Jun 18 11:43:54 1998 Nick Clifton <nickc@cygnus.com>
|
Thu Jun 18 11:43:54 1998 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
* config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Disallow REG+REG
|
* config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Disallow REG+REG
|
||||||
|
@ -4451,29 +4451,18 @@ build_abbrev_table (die)
|
|||||||
build_abbrev_table (c);
|
build_abbrev_table (c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the size of a string, including the null byte. */
|
/* Return the size of a string, including the null byte.
|
||||||
|
|
||||||
|
This used to treat backslashes as escapes, and hence they were not included
|
||||||
|
in the count. However, that conflicts with what ASM_OUTPUT_ASCII does,
|
||||||
|
which treats a backslash as a backslash, escaping it if necessary, and hence
|
||||||
|
we must include them in the count. */
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
size_of_string (str)
|
size_of_string (str)
|
||||||
register char *str;
|
register char *str;
|
||||||
{
|
{
|
||||||
register unsigned long size = 0;
|
return strlen (str) + 1;
|
||||||
register unsigned long slen = strlen (str);
|
|
||||||
register unsigned long i;
|
|
||||||
register unsigned c;
|
|
||||||
|
|
||||||
for (i = 0; i < slen; ++i)
|
|
||||||
{
|
|
||||||
c = str[i];
|
|
||||||
if (c == '\\')
|
|
||||||
++i;
|
|
||||||
|
|
||||||
size += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Null terminator. */
|
|
||||||
size += 1;
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the size of a location descriptor. */
|
/* Return the size of a location descriptor. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user