This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/commit] replace strcmp by FILENAME_CMP for filename comparison


This is a change that I suggested in a (very late) comment:
    http://www.sourceware.org/ml/gdb-patches/2010-08/msg00427.html
    http://www.sourceware.org/ml/gdb-patches/2010-10/msg00363.html

gdb/ChangeLog:

        * dwarf2read.c (psymtab_include_file_name): Replace call to strcmp
        by call to FILENAME_CMP.

Tested on x86_64-linux. Does it look OK?

Thanks,
-- 
Joel

---
 gdb/dwarf2read.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7c78454..e613d90 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -10087,7 +10087,7 @@ psymtab_include_file_name (const struct line_header *lh, int file_index,
       pst_filename = copied_name;
     }
 
-  file_is_pst = strcmp (include_name_to_compare, pst_filename) == 0;
+  file_is_pst = FILENAME_CMP (include_name_to_compare, pst_filename) == 0;
 
   if (include_name_to_compare != include_name)
     xfree (include_name_to_compare);
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]