aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>2002-10-11 17:50:10 +0000
committerMartin Hunt <hunt@redhat.com>2002-10-11 17:50:10 +0000
commitd5dc79609d457bf976659a99e35cd987d6bb5809 (patch)
tree04284eb529a5838203120b378ac1d7f831fa4929 /gdb/utils.c
parentc85508ee3c526f5c128f71ea91e373a8722b369d (diff)
downloadgdb-d5dc79609d457bf976659a99e35cd987d6bb5809.zip
gdb-d5dc79609d457bf976659a99e35cd987d6bb5809.tar.gz
gdb-d5dc79609d457bf976659a99e35cd987d6bb5809.tar.bz2
2002-10-11 Martin M. Hunt <hunt@redhat.com>
* utils.c (string_to_core_addr): After turning string into a number, convert to a CORE_ADDR using INTEGER_TO_ADDRESS which will do necessary sign-extension, etc.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 9aab625..d1b4c99 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2649,6 +2649,8 @@ string_to_core_addr (const char *my_string)
internal_error (__FILE__, __LINE__, "invalid decimal");
}
}
+ if (INTEGER_TO_ADDRESS_P ())
+ addr = INTEGER_TO_ADDRESS (builtin_type_void_data_ptr, &addr);
return addr;
}