Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] string_to_core_addr fix
@ 2002-10-10 15:09 Martin M. Hunt
  2002-10-10 15:40 ` Kevin Buettner
  0 siblings, 1 reply; 7+ messages in thread
From: Martin M. Hunt @ 2002-10-10 15:09 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

This is necessary for 64-bit targets where sometimes 32-bit
values must be sign-extended to 64-bits.

2002-10-10  Martin M. Hunt  <hunt@redhat.com>

	* utils.c (string_to_core_addr): After turning string into
	a number, convert to a CORE_ADDR using POINTER_TO_ADDRESS
	which will do necessary sign-extension, etc.

-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.

[-- Attachment #2: p --]
[-- Type: text/x-diff, Size: 486 bytes --]

Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.80
diff -u -p -r1.80 utils.c
--- utils.c	20 Sep 2002 00:24:01 -0000	1.80
+++ utils.c	10 Oct 2002 22:06:50 -0000
@@ -2649,7 +2649,7 @@ string_to_core_addr (const char *my_stri
 	    internal_error (__FILE__, __LINE__, "invalid decimal");
 	}
     }
-  return addr;
+  return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &addr); 
 }
 
 char *

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

end of thread, other threads:[~2002-10-23  5:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 15:09 [RFA] string_to_core_addr fix Martin M. Hunt
2002-10-10 15:40 ` Kevin Buettner
2002-10-10 21:31   ` Martin M. Hunt
2002-10-11  0:08     ` Kevin Buettner
2002-10-21 13:06       ` Andrew Cagney
2002-10-22 20:08         ` Martin M. Hunt
2002-10-22 22:35           ` Andrew Cagney

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