From 79132d4de8bdc2c04f8f442090f556c3deb0c5a4 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 20 Nov 2004 10:20:33 +0000 Subject: [PATCH] * dbxread.c: Include "gdb_string.h". (record_minimal_symbol, read_ofile_symtab): Replace DEPRECATED_STREQ and DEPRECATED_STREQN with strcmp and strncmp. * Makefile.in (dbxread.o): Update dependencies. --- gdb/ChangeLog | 5 +++++ gdb/Makefile.in | 2 +- gdb/dbxread.c | 14 ++++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 512b841e9f..a669255653 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2004-11-20 Mark Kettenis + * dbxread.c: Include "gdb_string.h". + (record_minimal_symbol, read_ofile_symtab): Replace + DEPRECATED_STREQ and DEPRECATED_STREQN with strcmp and strncmp. + * Makefile.in (dbxread.o): Update dependencies. + * dwarf2-frame.c (read_encoded_value): Correctly calculate number of bytes read for aligned LEB128 encodings. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 295f9ae322..2baebbfc5b 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1830,7 +1830,7 @@ dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \ $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \ $(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \ $(gdb_stabs_h) $(demangle_h) $(complaints_h) $(cp_abi_h) \ - $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h) + $(gdb_assert_h) $(gdb_string_h) $(aout_aout64_h) $(aout_stab_gnu_h) dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \ $(gdbcore_h) $(target_h) demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \ diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 21f4399fa6..e804c10236 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -56,7 +56,9 @@ #include "demangle.h" #include "complaints.h" #include "cp-abi.h" + #include "gdb_assert.h" +#include "gdb_string.h" #include "aout/aout64.h" #include "aout/stab_gnu.h" /* We always use GNU stabs, not native, now */ @@ -481,7 +483,7 @@ record_minimal_symbol (char *name, CORE_ADDR address, int type, Record it as global even if it's local, not global, so lookup_minimal_symbol can find it. We don't check symbol_leading_char because for SunOS4 it always is '_'. */ - if (name[8] == 'C' && DEPRECATED_STREQ ("__DYNAMIC", name)) + if (name[8] == 'C' && strcmp ("__DYNAMIC", name) == 0) ms_type = mst_data; /* Same with virtual function tables, both global and static. */ @@ -2503,13 +2505,13 @@ read_ofile_symtab (struct partial_symtab *pst) { const char *tempstring = namestring; - if (DEPRECATED_STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL)) + if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0) processing_gcc_compilation = 1; - else if (DEPRECATED_STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL)) + else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0) processing_gcc_compilation = 2; if (tempstring[0] == bfd_get_symbol_leading_char (symfile_bfd)) ++tempstring; - if (DEPRECATED_STREQN (tempstring, "__gnu_compiled", 14)) + if (strncmp (tempstring, "__gnu_compiled", 14) == 0) processing_gcc_compilation = 2; } @@ -2575,9 +2577,9 @@ read_ofile_symtab (struct partial_symtab *pst) However, there is no reason not to accept the GCC_COMPILED_FLAG_SYMBOL anywhere. */ - if (DEPRECATED_STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL)) + if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0) processing_gcc_compilation = 1; - else if (DEPRECATED_STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL)) + else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0) processing_gcc_compilation = 2; #if 0 -- 2.11.0