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.
This commit is contained in:
parent
8556afb4f5
commit
1b162304d1
@ -1,3 +1,10 @@
|
|||||||
|
2012-06-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2012-06-05 Pedro Alves <palves@redhat.com>
|
2012-06-05 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
PR backtrace/13866
|
PR backtrace/13866
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
gdb_static_assert (sizeof (CORE_ADDR) == sizeof (bfd_vma));
|
gdb_static_assert (sizeof (CORE_ADDR) == sizeof (bfd_vma));
|
||||||
gdb_static_assert (sizeof (gdb_byte) == sizeof (bfd_byte));
|
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
|
/* Provide bfd/ compatible prototype for target_read_memory. Casting would not
|
||||||
be enough as LEN width may differ. */
|
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)
|
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
|
/* MYADDR must be already allocated for the LEN size so it has to fit in
|
||||||
size_t. */
|
ssize_t. */
|
||||||
gdb_assert ((size_t) len == len);
|
gdb_assert ((ssize_t) len == len);
|
||||||
|
|
||||||
return target_read_memory (memaddr, myaddr, len);
|
return target_read_memory (memaddr, myaddr, len);
|
||||||
}
|
}
|
||||||
|
@ -1756,7 +1756,7 @@ target_xfer_partial (struct target_ops *ops,
|
|||||||
it makes no progress, and then return how much was transferred). */
|
it makes no progress, and then return how much was transferred). */
|
||||||
|
|
||||||
int
|
int
|
||||||
target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, size_t len)
|
target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
|
||||||
{
|
{
|
||||||
/* Dispatch to the topmost target, not the flattened current_target.
|
/* Dispatch to the topmost target, not the flattened current_target.
|
||||||
Memory accesses check target->to_has_(all_)memory, and the
|
Memory accesses check target->to_has_(all_)memory, and the
|
||||||
|
@ -997,7 +997,7 @@ extern void target_dcache_invalidate (void);
|
|||||||
extern int target_read_string (CORE_ADDR, char **, int, int *);
|
extern int target_read_string (CORE_ADDR, char **, int, int *);
|
||||||
|
|
||||||
extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
|
extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
|
||||||
size_t len);
|
ssize_t len);
|
||||||
|
|
||||||
extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
|
extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user