Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Signed vs. unsigned adresses in solib-svr4
@ 2007-03-27 19:16 Andreas Schwab
  2007-03-27 19:21 ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2007-03-27 19:16 UTC (permalink / raw)
  To: gdb-patches

All but two places in solib-svr4.c assume unsigned target addresses.  This
patch fixes these two occurences of extract_signed_integer to make things
consistent.

Andreas.

2007-03-27  Andreas Schwab  <schwab@suse.de>

	* solib-svr4.c (LM_ADDR_FROM_LINK_MAP): Use
	extract_unsigned_integer instead of extract_signed_integer.
	(LM_DYNAMIC_FROM_LINK_MAP): Likewise.

Index: solib-svr4.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-svr4.c,v
retrieving revision 1.61
diff -u -a -p -u -p -a -r1.61 solib-svr4.c
--- solib-svr4.c	9 Jan 2007 17:58:58 -0000	1.61
+++ solib-svr4.c	27 Mar 2007 19:12:52 -0000
@@ -138,9 +138,9 @@ LM_ADDR_FROM_LINK_MAP (struct so_list *s
 {
   struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
 
-  return (CORE_ADDR) extract_signed_integer (so->lm_info->lm
-					     + lmo->l_addr_offset,
-					     lmo->l_addr_size);
+  return (CORE_ADDR) extract_unsigned_integer (so->lm_info->lm
+					       + lmo->l_addr_offset,
+					       lmo->l_addr_size);
 }
 
 static int
@@ -158,9 +158,9 @@ LM_DYNAMIC_FROM_LINK_MAP (struct so_list
 
   gdb_assert (lmo->l_ld_size != 0);
 
-  return (CORE_ADDR) extract_signed_integer (so->lm_info->lm
-					     + lmo->l_ld_offset,
-					     lmo->l_ld_size);
+  return (CORE_ADDR) extract_unsigned_integer (so->lm_info->lm
+					       + lmo->l_ld_offset,
+					       lmo->l_ld_size);
 }
 
 static CORE_ADDR

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-05-09 19:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27 19:16 Signed vs. unsigned adresses in solib-svr4 Andreas Schwab
2007-03-27 19:21 ` Daniel Jacobowitz
2007-03-27 20:20   ` Andreas Schwab
2007-03-27 20:36     ` Daniel Jacobowitz
2007-03-29 11:38       ` Andreas Schwab
2007-03-29 17:56         ` Daniel Jacobowitz
2007-04-10  6:57           ` Kevin Buettner
2007-03-31  9:10         ` Mark Kettenis
2007-05-09 17:55         ` Ulrich Weigand
2007-05-09 18:38           ` Andreas Schwab
2007-05-09 19:46             ` Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox