This is the mail archive of the gdb-patches@sources.redhat.com 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]

[rfc/patch] rename hp thread local mechanism


I am following up on the thread local storage work that JimB started.
Support in gcc, binutils, glibc is now in place, so gdb can do it too.

I have started this work from the patch that Jim posted back in July:
http://sources.redhat.com/ml/gdb-patches/2002-07/msg00025.html

For starters I would like to address the issue with the HP specific
support for thread local storage. It is done differently and it would
conflict with what we need to do now, i.e. implement it in target
vector specific code.

I think there was some (kind of) consensus on renaming the location
type. I decided to rename the location name used by the HP code, since
that needs to be fixed anyway. 

Thoughts?

Elena

2002-10-01  Elena Zannoni  <ezannoni@redhat.com>

	* symtab.h (address_class):  Rename
	LOC_THREAD_LOCAL_STATIC to LOC_HP_THREAD_LOCAL_STATIC.
	* hpread.c (hpread_process_one_debug_symbol): Ditto.
	* printcmd.c (address_info): Ditto.
	* findvar.c (symbol_read_needs_frame, read_var_value): Ditto.

Index: hpread.c
===================================================================
RCS file: /cvs/uberbaum/gdb/hpread.c,v
retrieving revision 1.22
diff -u -p -r1.22 hpread.c
--- hpread.c	4 Aug 2002 19:11:12 -0000	1.22
+++ hpread.c	1 Oct 2002 22:22:08 -0000
@@ -5742,7 +5742,7 @@ hpread_process_one_debug_symbol (union d
 	{
 	  /* Thread-local variable.
 	   */
-	  SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
+	  SYMBOL_CLASS (sym) = LOC_HP_THREAD_LOCAL_STATIC;
 	  SYMBOL_BASEREG (sym) = CR27_REGNUM;
 
 	  if (objfile->flags & OBJF_SHARED)

Index: findvar.c
===================================================================
RCS file: /cvs/uberbaum/gdb/findvar.c,v
retrieving revision 1.35
diff -u -p -r1.35 findvar.c
--- findvar.c	24 Jul 2002 22:46:48 -0000	1.35
+++ findvar.c	1 Oct 2002 22:22:26 -0000
@@ -391,7 +391,7 @@ symbol_read_needs_frame (struct symbol *
     case LOC_LOCAL_ARG:
     case LOC_BASEREG:
     case LOC_BASEREG_ARG:
-    case LOC_THREAD_LOCAL_STATIC:
+    case LOC_HP_THREAD_LOCAL_STATIC:
       return 1;
 
     case LOC_UNDEF:
@@ -529,7 +529,7 @@ addresses have not been bound by the dyn
 
     case LOC_BASEREG:
     case LOC_BASEREG_ARG:
-    case LOC_THREAD_LOCAL_STATIC:
+    case LOC_HP_THREAD_LOCAL_STATIC:
       {
 	struct value *regval;
 
Index: printcmd.c
===================================================================
RCS file: /cvs/uberbaum/gdb/printcmd.c,v
retrieving revision 1.43
diff -u -p -r1.43 printcmd.c
--- printcmd.c	19 Sep 2002 03:58:41 -0000	1.43
+++ printcmd.c	1 Oct 2002 22:22:50 -0000
@@ -1275,7 +1275,7 @@ address_info (char *exp, int from_tty)
       }
       break;
 
-    case LOC_THREAD_LOCAL_STATIC:
+    case LOC_HP_THREAD_LOCAL_STATIC:
       printf_filtered (
 			"a thread-local variable at offset %ld from the thread base register %s",
 			val, REGISTER_NAME (basereg));

Index: symtab.h
===================================================================
RCS file: /cvs/uberbaum/gdb/symtab.h,v
retrieving revision 1.42
diff -u -p -r1.42 symtab.h
--- symtab.h	20 Sep 2002 14:58:58 -0000	1.42
+++ symtab.h	1 Oct 2002 22:23:39 -0000
@@ -611,9 +611,9 @@ enum address_class
   LOC_UNRESOLVED,
 
   /* Value is at a thread-specific location calculated by a
-     target-specific method. */
+     target-specific method. This is used only by hppa.  */
 
-  LOC_THREAD_LOCAL_STATIC,
+  LOC_HP_THREAD_LOCAL_STATIC,
 
   /* The variable does not actually exist in the program.
      The value is ignored.  */


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