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]

[COMMITTED PATCH] Revert fix to symtab/17602, bigger fix needed


Hi.

This patch caused a regression in gdb.ada/operator_bp.exp.

https://sourceware.org/ml/gdb-patches/2014-11/msg00642.html

There's still a bug here, but the deeper I dig the bigger the problem I find.
Wrong comments, confusing code, and on and on ...
[More than once I've gotten to the point of wondering "How does this
work at all?" :-(]

So I'm going to revert this patch for now and work on a better fix.

2014-12-05  Doug Evans  <xdje42@gmail.com>

	Revert:
	PR symtab/17602
	* linespec.c (iterate_name_matcher): Fix arguments to symbol_name_cmp.

diff --git a/gdb/linespec.c b/gdb/linespec.c
index af958dc..82384ca 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -982,12 +982,7 @@ iterate_name_matcher (const char *name, void *d)
 {
   const struct symbol_matcher_data *data = d;
 
-  /* The order of arguments we pass to symbol_name_cmp is important as
-     strcmp_iw, a typical value for symbol_name_cmp, only performs special
-     processing of '(' to remove overload info on the first argument and not
-     the second.  The first argument is what the user provided, the second
-     argument is what came from partial syms / .gdb_index.  */
-  if (data->symbol_name_cmp (data->lookup_name, name) == 0)
+  if (data->symbol_name_cmp (name, data->lookup_name) == 0)
     return 1; /* Expand this symbol's symbol table.  */
   return 0; /* Skip this symbol.  */
 }


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