Author: Øyvind Harboe <oyvind.harboe@zylin.com>
- Allow target_read/write_buffer of size 0 git-svn-id: svn://svn.berlios.de/openocd/trunk@1870 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
869ef01f3c
commit
4b992717b5
|
@ -985,6 +985,10 @@ int target_write_buffer(struct target_s *target, u32 address, u32 size, u8 *buff
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (size == 0) {
|
||||||
|
return ERROR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if ((address + size - 1) < address)
|
if ((address + size - 1) < address)
|
||||||
{
|
{
|
||||||
/* GDB can request this when e.g. PC is 0xfffffffc*/
|
/* GDB can request this when e.g. PC is 0xfffffffc*/
|
||||||
|
@ -1060,6 +1064,10 @@ int target_read_buffer(struct target_s *target, u32 address, u32 size, u8 *buffe
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (size == 0) {
|
||||||
|
return ERROR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if ((address + size - 1) < address)
|
if ((address + size - 1) < address)
|
||||||
{
|
{
|
||||||
/* GDB can request this when e.g. PC is 0xfffffffc*/
|
/* GDB can request this when e.g. PC is 0xfffffffc*/
|
||||||
|
|
Loading…
Reference in New Issue