aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile-mem.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-06-05 21:18:05 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-06-05 21:18:05 +0000
commit1b162304d12fb239357849951093adf48609265a (patch)
tree85df35493914699d8e3142209c8286a35bdc5ee2 /gdb/symfile-mem.c
parent8556afb4f53f99b32e75285a7eb3839e0b6911ee (diff)
downloadgdb-1b162304d12fb239357849951093adf48609265a.zip
gdb-1b162304d12fb239357849951093adf48609265a.tar.gz
gdb-1b162304d12fb239357849951093adf48609265a.tar.bz2
gdb/
* symfile-mem.c: Change gdb_static_assert to ssize_t. (target_read_memory_bfd): Cast gdb_assert LEN to ssize_t. * target.c (target_read_memory): Change LEN to ssize_t. * target.h (target_read_memory): Change LEN to ssize_t.
Diffstat (limited to 'gdb/symfile-mem.c')
-rw-r--r--gdb/symfile-mem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c
index 45d95a7..e80fd25 100644
--- a/gdb/symfile-mem.c
+++ b/gdb/symfile-mem.c
@@ -60,7 +60,7 @@
gdb_static_assert (sizeof (CORE_ADDR) == sizeof (bfd_vma));
gdb_static_assert (sizeof (gdb_byte) == sizeof (bfd_byte));
-gdb_static_assert (sizeof (size_t) <= sizeof (bfd_size_type));
+gdb_static_assert (sizeof (ssize_t) <= sizeof (bfd_size_type));
/* Provide bfd/ compatible prototype for target_read_memory. Casting would not
be enough as LEN width may differ. */
@@ -69,8 +69,8 @@ static int
target_read_memory_bfd (bfd_vma memaddr, bfd_byte *myaddr, bfd_size_type len)
{
/* MYADDR must be already allocated for the LEN size so it has to fit in
- size_t. */
- gdb_assert ((size_t) len == len);
+ ssize_t. */
+ gdb_assert ((ssize_t) len == len);
return target_read_memory (memaddr, myaddr, len);
}