This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] remove set_tfile_traceframe and cur_traceframe_number
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: <palves at redhat dot com>
- Date: Tue, 24 Jul 2012 00:07:16 +0800
- Subject: Re: [RFC] remove set_tfile_traceframe and cur_traceframe_number
- References: <1340804875-23979-1-git-send-email-yao@codesourcery.com>
On Wednesday, June 27, 2012 09:47:55 PM Yao Qi wrote:
> I can't see the necessity to use function set_tfile_traceframe and
> variable cur_traceframe_number. IIUC, both set_tfile_traceframe
> and cur_traceframe_number are equivalent to remote.c:set_remote_traceframe
> and remote.c:remote_traceframe_number. set_remote_traceframe
> and remote_traceframe_number are used to switch between traceframe
> and live inferior in a lazy mode. However, this requirement doesn't
> exists in tfile, because GDB only reads from trace file. This is
> the reason I propose to remove them. Regression tested on native
> and gdbserver on x86_64-linux. OK to apply?
The code this patch tries to remove was added by Pedro in this patch,
[unavailable values part 1, 05/17] move traceframe memory reading fallback
to read-only sections to GDB side
http://sourceware.org/ml/gdb-patches/2011-02/msg00136.html
in order to make GDB to read read-only memory from the live target. Pedro's
patch did something similar to both remote target and tfile target. It makes
sense to remote target, because there is a live inferior that GDB can access.
However, it is not necessary for tfile target, because there is no live
inferior at all. IMO, it is correct to remove them in this patch.
--
Yao (éå)