gdb/gdb-bz645773-case-insensitive-1of5.patch
Sascha Peilicke ab51a8efb0 Accepting request 78265 from devel:gcc
- Merge from gdb-7.3-41.fc15.src.rpm.  [fate#310741]
  * Tue Jul 26 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3-41.fc15
  - Rebase to the final FSF GDB 7.3 release.
  - Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
  
  * Sun Jul  3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110703-40.fc15
  - Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release).
    - Adjust the `print errno' patch due to the DW_AT_linkage_name following again.
  
  * Fri Jun 24 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-39.fc15
  - Fix install-info for the gdb-doc subpackage (BZ 715228).

- Merge from gdb-7.2.90.20110525-38.fc15.src.rpm.  [fate#310741]
  * Wed May 25 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-38.fc15
  - Rebase to FSF GDB 7.2.90.20110525 (which is a 7.3 pre-release).
  - [stap] Fix double free (Sergio Durigan Junior).
  
  * Tue May  3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-37.fc15
  - Search also for .<seqno> files in /usr/lib/debug/.build-id (BZ 641377).

- Merge from gdb-7.2.90.20110429-36.fc15.src.rpm.
  * Mon May  2 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-36.fc15
  - Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
    - Use --without-system-readline, disable Requires and BuildRequires of readline.
    - Drop gdb-6.5-readline-long-line-crash.patch and gdb-readline-6.0-signal.patch.
  
  * Fri Apr 29 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-35.fc15
  - Rebase to FSF GDB 7.2.90.20110429 (which is a 7.3 pre-release).
  - Fix -O2 -g breakpoints internal error + prologue skipping (BZ 612253).
  - Fix case insensitive symbols for Fortran by iFort (BZ 645773).

OBS-URL: https://build.opensuse.org/request/show/78265
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=85
2011-08-11 13:47:36 +00:00

85 lines
2.8 KiB
Diff

[patch] Code cleanup: New SYMBOL_HASH_NEXT
http://sourceware.org/ml/gdb-patches/2011-04/msg00022.html
http://sourceware.org/ml/gdb-cvs/2011-04/msg00043.html
### src/gdb/ChangeLog 2011/04/06 03:24:22 1.12908
### src/gdb/ChangeLog 2011/04/06 19:50:03 1.12909
## -1,3 +1,12 @@
+2011-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup.
+ * dictionary.c (dict_hash): Use SYMBOL_HASH_NEXT.
+ * dwarf2read.c (mapped_index_string_hash): Refer to SYMBOL_HASH_NEXT
+ in the function comment, a new note on values compatibility.
+ * minsyms.c (msymbol_hash_iw, msymbol_hash): Use SYMBOL_HASH_NEXT.
+ * symtab.h (SYMBOL_HASH_NEXT): New.
+
2011-04-06 Thiago Jung Bauermann <bauerman@br.ibm.com>
* ppc-linux-nat.c (check_condition): Add len output parameter.
--- src/gdb/dictionary.c 2011/01/07 19:36:15 1.21
+++ src/gdb/dictionary.c 2011/04/06 19:50:04 1.22
@@ -826,7 +826,7 @@
}
/* FALL THROUGH */
default:
- hash = hash * 67 + *string - 113;
+ hash = SYMBOL_HASH_NEXT (hash, *string);
string += 1;
break;
}
--- src/gdb/dwarf2read.c 2011/04/04 14:10:12 1.520
+++ src/gdb/dwarf2read.c 2011/04/06 19:50:04 1.521
@@ -1962,11 +1962,11 @@
do_cleanups (cleanup);
}
-/* The hash function for strings in the mapped index. This is the
- same as the hashtab.c hash function, but we keep a separate copy to
- maintain control over the implementation. This is necessary
- because the hash function is tied to the format of the mapped index
- file. */
+/* The hash function for strings in the mapped index. This is the same as
+ SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
+ implementation. This is necessary because the hash function is tied to the
+ format of the mapped index file. The hash values do not have to match with
+ SYMBOL_HASH_NEXT. */
static hashval_t
mapped_index_string_hash (const void *p)
--- src/gdb/minsyms.c 2011/03/28 20:29:51 1.81
+++ src/gdb/minsyms.c 2011/04/06 19:50:05 1.82
@@ -91,7 +91,7 @@
++string;
if (*string && *string != '(')
{
- hash = hash * 67 + *string - 113;
+ hash = SYMBOL_HASH_NEXT (hash, *string);
++string;
}
}
@@ -106,7 +106,7 @@
unsigned int hash = 0;
for (; *string; ++string)
- hash = hash * 67 + *string - 113;
+ hash = SYMBOL_HASH_NEXT (hash, *string);
return hash;
}
--- src/gdb/symtab.h 2011/04/04 15:19:59 1.177
+++ src/gdb/symtab.h 2011/04/06 19:50:05 1.178
@@ -1004,6 +1004,12 @@
extern unsigned int msymbol_hash (const char *);
+/* Compute the next hash value from previous HASH and the character C. This
+ is only a GDB in-memory computed value with no external files compatibility
+ requirements. */
+
+#define SYMBOL_HASH_NEXT(hash, c) ((hash) * 67 + (c) - 113)
+
extern struct objfile * msymbol_objfile (struct minimal_symbol *sym);
extern void