summary refs log tree commit diff
path: root/nptl_db
diff options
context:
space:
mode:
Diffstat (limited to 'nptl_db')
-rw-r--r--nptl_db/ChangeLog5
-rw-r--r--nptl_db/fetch-value.c5
-rw-r--r--nptl_db/thread_dbP.h4
3 files changed, 10 insertions, 4 deletions
diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
index f7a081ebd9..6f01f2be72 100644
--- a/nptl_db/ChangeLog
+++ b/nptl_db/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-24  Roland McGrath  <roland@redhat.com>
+
+	* fetch-value.c (_td_locate_field): Cast DB_DESC_OFFSET to int32_t.
+	* thread_dbP.h (DB_DESC_OFFSET): Remove cast from definition.
+
 2004-03-13  Jakub Jelinek  <jakub@redhat.com>
 
 	* db_info.c: Don't use TLS_TP_OFFSET in the #if, but
diff --git a/nptl_db/fetch-value.c b/nptl_db/fetch-value.c
index 9d40b61691..0d9bb0eb80 100644
--- a/nptl_db/fetch-value.c
+++ b/nptl_db/fetch-value.c
@@ -1,5 +1,5 @@
 /* Helper routines for libthread_db.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -78,7 +78,8 @@ _td_locate_field (td_thragent_t *ta,
   if (elemsize & 0xff000000U)
     elemsize = bswap_32 (elemsize);
 
-  *address += DB_DESC_OFFSET (desc) + (elemsize / 8 * (idx - (psaddr_t) 0));
+  *address += (int32_t) DB_DESC_OFFSET (desc);
+  *address += (elemsize / 8 * (idx - (psaddr_t) 0));
   return TD_OK;
 }
 
diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h
index 64266200f0..5504dd070f 100644
--- a/nptl_db/thread_dbP.h
+++ b/nptl_db/thread_dbP.h
@@ -1,5 +1,5 @@
 /* Private header for thread debug library
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -66,7 +66,7 @@ extern int __td_debug attribute_hidden;
 
 #define DB_DESC_SIZE(desc)	((desc)[0])
 #define DB_DESC_NELEM(desc)	((desc)[1])
-#define DB_DESC_OFFSET(desc)	((int32_t) (desc)[2])
+#define DB_DESC_OFFSET(desc)	((desc)[2])
 #define DB_SIZEOF_DESC		(3 * sizeof (uint32_t))
 #define DB_DEFINE_DESC(name, size, nelem, offset) \
   const uint32_t name[3] = { (size), (nelem), (offset) }