aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2011-02-28 18:32:52 +0000
committerKai Tietz <kai.tietz@onevision.com>2011-02-28 18:32:52 +0000
commit8b6efd89a4135971b748c958a852d093b3d79d3d (patch)
tree0aaae284e884b627bb059825c1b55590cc1327c9 /binutils
parentc05202a107c40a2e1efb1739b7dc2cfaf3b0ed9b (diff)
downloadgdb-8b6efd89a4135971b748c958a852d093b3d79d3d.zip
gdb-8b6efd89a4135971b748c958a852d093b3d79d3d.tar.gz
gdb-8b6efd89a4135971b748c958a852d093b3d79d3d.tar.bz2
ChangeLog binutils/
2011-02-28 Kai Tietz <kai.tietz@onevision.com> * debug.c (debug_start_source): Use filename_(n)cmp. * ieee.c (ieee_finish_compilation_unit): Likewise. (ieee_lineno): Likewise. * nlmconv.c (main): Likewise. * objcopy.c (strip_main): Likewise. (copy_main): Likewise. * objdump.c (show_line): Likewise. (dump_reloc_set): Likewise. * srconv.c (main): Likewise. * wrstabs.c (stab_lineno): Likewise. ChangeLog gas/ 2011-02-28 Kai Tietz <kai.tietz@onevision.com> * depend.c (register_dependency): Use filename_(n)cmp. * dwarf2dbg.c (get_filenum): Likewise. * ecoff.c (add_file): Likewise. (ecoff_generate_asm_lineno): Likewise. * input-scrub.c (new_logical_line_flags): Likewise. * listing.c (file_info): Likewise. (listing_newline): Likewise. * remap.c (remap_debug_filename): Likewise. * stabs.c (generate_asm_file): Likewise. (stabs_generate_asm_lineno): Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog13
-rw-r--r--binutils/debug.c5
-rw-r--r--binutils/ieee.c13
-rw-r--r--binutils/nlmconv.c3
-rw-r--r--binutils/objcopy.c6
-rw-r--r--binutils/objdump.c4
-rw-r--r--binutils/resbin.c1
-rw-r--r--binutils/srconv.c3
-rw-r--r--binutils/wrstabs.c3
9 files changed, 36 insertions, 15 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f481dbf..7d0b89d 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,16 @@
+2011-02-28 Kai Tietz <kai.tietz@onevision.com>
+
+ * debug.c (debug_start_source): Use filename_(n)cmp.
+ * ieee.c (ieee_finish_compilation_unit): Likewise.
+ (ieee_lineno): Likewise.
+ * nlmconv.c (main): Likewise.
+ * objcopy.c (strip_main): Likewise.
+ (copy_main): Likewise.
+ * objdump.c (show_line): Likewise.
+ (dump_reloc_set): Likewise.
+ * srconv.c (main): Likewise.
+ * wrstabs.c (stab_lineno): Likewise.
+
2011-02-24 Zachary T Welch <zwelch@codesourcery.com>
* readelf.c (decode_arm_unwind): Implement decoding of remaining
diff --git a/binutils/debug.c b/binutils/debug.c
index ebe63f1..ee0d62e 100644
--- a/binutils/debug.c
+++ b/binutils/debug.c
@@ -31,6 +31,7 @@
#include <assert.h>
#include "bfd.h"
#include "libiberty.h"
+#include "filenames.h"
#include "debug.h"
/* Global information we keep for debugging. A pointer to this
@@ -729,9 +730,7 @@ debug_start_source (void *handle, const char *name)
for (f = info->current_unit->files; f != NULL; f = f->next)
{
- if (f->filename[0] == name[0]
- && f->filename[1] == name[1]
- && strcmp (f->filename, name) == 0)
+ if (filename_cmp (f->filename, name) == 0)
{
info->current_file = f;
return TRUE;
diff --git a/binutils/ieee.c b/binutils/ieee.c
index 34b9373..c8460dc 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -4938,7 +4938,7 @@ ieee_finish_compilation_unit (struct ieee_handle *info)
if (! ieee_change_buffer (info, &info->linenos)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum))
return FALSE;
- if (strcmp (info->filename, info->lineno_filename) != 0)
+ if (filename_cmp (info->filename, info->lineno_filename) != 0)
{
/* We were not in the main file. We just closed the
included line number block, and now we must close the
@@ -7339,15 +7339,17 @@ ieee_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
info->lineno_filename = info->filename;
}
- if (strcmp (info->pending_lineno_filename, info->lineno_filename) != 0)
+ if (filename_cmp (info->pending_lineno_filename,
+ info->lineno_filename) != 0)
{
- if (strcmp (info->filename, info->lineno_filename) != 0)
+ if (filename_cmp (info->filename, info->lineno_filename) != 0)
{
/* We were not in the main file. Close the block for the
included file. */
if (! ieee_write_byte (info, (int) ieee_be_record_enum))
return FALSE;
- if (strcmp (info->filename, info->pending_lineno_filename) == 0)
+ if (filename_cmp (info->filename,
+ info->pending_lineno_filename) == 0)
{
/* We need a new NN record, and we aren't about to
output one. */
@@ -7359,7 +7361,8 @@ ieee_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
return FALSE;
}
}
- if (strcmp (info->filename, info->pending_lineno_filename) != 0)
+ if (filename_cmp (info->filename,
+ info->pending_lineno_filename) != 0)
{
/* We are not changing to the main file. Open a block for
the new included file. */
diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c
index a675f61..157b41c 100644
--- a/binutils/nlmconv.c
+++ b/binutils/nlmconv.c
@@ -37,6 +37,7 @@
#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
+#include "filenames.h"
#include "safe-ctype.h"
#include "ansidecl.h"
@@ -268,7 +269,7 @@ main (int argc, char **argv)
++optind;
if (optind < argc)
show_usage (stderr, 1);
- if (strcmp (input_file, output_file) == 0)
+ if (filename_cmp (input_file, output_file) == 0)
{
fatal (_("input and output files must be different"));
}
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index ac176df..51ea732f 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3035,7 +3035,8 @@ strip_main (int argc, char *argv[])
It has already been checked in get_file_size(). */
stat (argv[i], &statbuf);
- if (output_file == NULL || strcmp (argv[i], output_file) == 0)
+ if (output_file == NULL
+ || filename_cmp (argv[i], output_file) == 0)
tmpname = make_tempname (argv[i]);
else
tmpname = output_file;
@@ -3902,7 +3903,8 @@ copy_main (int argc, char *argv[])
/* If there is no destination file, or the source and destination files
are the same, then create a temp and rename the result into the input. */
- if (output_filename == NULL || strcmp (input_filename, output_filename) == 0)
+ if (output_filename == NULL
+ || filename_cmp (input_filename, output_filename) == 0)
tmpname = make_tempname (input_filename);
else
tmpname = output_filename;
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 0be662f..034514a 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1348,7 +1348,7 @@ show_line (bfd *abfd, asection *section, bfd_vma addr_offset)
unsigned l;
for (pp = &print_files; *pp != NULL; pp = &(*pp)->next)
- if (strcmp ((*pp)->filename, filename) == 0)
+ if (filename_cmp ((*pp)->filename, filename) == 0)
break;
p = *pp;
@@ -2856,7 +2856,7 @@ dump_reloc_set (bfd *abfd, asection *sec, arelent **relpp, long relcount)
&& (linenumber != last_line
|| (filename != NULL
&& last_filename != NULL
- && strcmp (filename, last_filename) != 0)))
+ && filename_cmp (filename, last_filename) != 0)))
{
printf ("%s:%u\n", filename == NULL ? "???" : filename, linenumber);
last_line = linenumber;
diff --git a/binutils/resbin.c b/binutils/resbin.c
index c35af98..b3682f7 100644
--- a/binutils/resbin.c
+++ b/binutils/resbin.c
@@ -1867,6 +1867,7 @@ res_to_bin_stringtable (windres_bfd *wrbfd, rc_uint_type off,
unichar *s;
slen = (rc_uint_type) st->strings[i].length;
+ if (slen == 0xffffffff) slen = 0;
s = st->strings[i].string;
length = 2 + slen * 2;
diff --git a/binutils/srconv.c b/binutils/srconv.c
index c288fd5..7b3d4a7 100644
--- a/binutils/srconv.c
+++ b/binutils/srconv.c
@@ -32,6 +32,7 @@
#include "sysroff.h"
#include "coffgrok.h"
#include "libiberty.h"
+#include "filenames.h"
#include "getopt.h"
#include "coff/internal.h"
@@ -1818,7 +1819,7 @@ main (int ac, char **av)
++optind;
if (optind < ac)
show_usage (stderr, 1);
- if (strcmp (input_file, output_file) == 0)
+ if (filename_cmp (input_file, output_file) == 0)
{
fatal (_("input and output files must be different"));
}
diff --git a/binutils/wrstabs.c b/binutils/wrstabs.c
index fd2283f..0ca861c 100644
--- a/binutils/wrstabs.c
+++ b/binutils/wrstabs.c
@@ -27,6 +27,7 @@
#include <assert.h>
#include "bfd.h"
#include "libiberty.h"
+#include "filenames.h"
#include "safe-ctype.h"
#include "bucomm.h"
#include "debug.h"
@@ -2261,7 +2262,7 @@ stab_lineno (void *p, const char *file, unsigned long lineno, bfd_vma addr)
if (addr > info->last_text_address)
info->last_text_address = addr;
- if (strcmp (file, info->lineno_filename) != 0)
+ if (filename_cmp (file, info->lineno_filename) != 0)
{
if (! stab_write_symbol (info, N_SOL, 0, addr, file))
return FALSE;