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]

only force symbol lookups with local variables on hppa


as a follow up to the slow script thread:
http://sources.redhat.com/ml/gdb/2006-08/msg00099.html

attached patch will change the behavior so symbols with dollar signs in them 
($) are only looked up when a specific arch says to do so (with hppa being 
the only one at the moment)
-mike

Attachment: pgp00000.pgp
Description: PGP signature

2006-08-20  Mike Frysinger  <vapier@gentoo.org>

	* parse.c (write_dollar_variable): Check LOOKUP_DOLLAR_SYMBOLS.
	* config/pa/tm-hppa.h [LOOKUP_DOLLAR_SYMBOLS]: Define.

--- gdb/parse.c
+++ gdb/parse.c
@@ -489,8 +489,12 @@ write_dollar_variable (struct stoken str
   /* On some systems, such as HP-UX and hppa-linux, certain system routines 
      have names beginning with $ or $$.  Check for those, first. */
 
+#ifdef LOOKUP_DOLLAR_SYMBOLS
   sym = lookup_symbol (copy_name (str), (struct block *) NULL,
 		       VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
+#else
+  sym = NULL;
+#endif
   if (sym)
     {
       write_exp_elt_opcode (OP_VAR_VALUE);
--- gdb/config/pa/tm-hppa.h
+++ gdb/config/pa/tm-hppa.h
@@ -28,3 +28,5 @@
 
 extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
 #define DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc)
+
+#define LOOKUP_DOLLAR_SYMBOLS

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