Commit 243e7835 by Jim Wilson Committed by Jim Wilson

Fix cygwin32 hosted dwarf2 target problem with line number info.

	* dwarf2out.c (size_of_string): Do count backslashes.

From-SVN: r20562
parent ce56e6ed
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>
* config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Disallow REG+REG
......
......@@ -4451,29 +4451,18 @@ build_abbrev_table (die)
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
size_of_string (str)
register char *str;
{
register unsigned long size = 0;
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 strlen (str) + 1;
}
/* Return the size of a location descriptor. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment