This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] ctf_xfer_partial: Return TARGET_XFER_E_IO instead of -1 on error
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 27 Oct 2015 02:02:29 -0000
- Subject: [binutils-gdb] ctf_xfer_partial: Return TARGET_XFER_E_IO instead of -1 on error
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c92444842b32533b6411230e3554509a09924163
commit c92444842b32533b6411230e3554509a09924163
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Mon Oct 26 22:00:41 2015 -0400
ctf_xfer_partial: Return TARGET_XFER_E_IO instead of -1 on error
Use the enum value instead of the corresponding int value.
gdb/ChangeLog:
* ctf.c (ctf_xfer_partial): Return TARGET_XFER_E_IO instead of
-1 on error.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/ctf.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a481f09..a063a04 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-26 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * ctf.c (ctf_xfer_partial): Return TARGET_XFER_E_IO instead of
+ -1 on error.
+
2015-10-26 Doug Evans <dje@google.com>
PR symtab/17391
diff --git a/gdb/ctf.c b/gdb/ctf.c
index 6c1aede..dc378d1 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -1273,7 +1273,7 @@ ctf_xfer_partial (struct target_ops *ops, enum target_object object,
{
/* We're only doing regular memory for now. */
if (object != TARGET_OBJECT_MEMORY)
- return -1;
+ return TARGET_XFER_E_IO;
if (readbuf == NULL)
error (_("ctf_xfer_partial: trace file is read-only"));