From 1ca49d376dec6a93e879bc9456617622d7e349b3 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 10 Feb 2014 17:17:32 +0800 Subject: Share code on to_xfer_partial for tfile and ctf target In the to_xfer_partial implementations of ctf and tfile, the code on reading from read-only sections is duplicated. This patch moves it to a separate function exec_read_partial_read_only. gdb: 2014-02-23 Yao Qi * ctf.c (ctf_xfer_partial): Move code to ... * exec.c (exec_read_partial_read_only): ... it. New function. * tracefile-tfile.c (tfile_xfer_partial): Likewise. * tracefile.c: Include "exec.h". * exec.h (exec_read_partial_read_only): Declare. --- gdb/tracefile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/tracefile.c') diff --git a/gdb/tracefile.c b/gdb/tracefile.c index 508f898..a7c3cf7 100644 --- a/gdb/tracefile.c +++ b/gdb/tracefile.c @@ -20,6 +20,7 @@ #include "defs.h" #include "tracefile.h" #include "ctf.h" +#include "exec.h" /* Helper macros. */ -- cgit v1.1