Unify ctf_fetch_registers and tfile_fetch_registers
authorYao Qi <yao@codesourcery.com>
Fri, 18 Apr 2014 11:32:01 +0000 (19:32 +0800)
committerYao Qi <yao@codesourcery.com>
Tue, 22 Apr 2014 01:21:55 +0000 (09:21 +0800)
commit48b6e87ef297136a6409c2c993c4626f28bbb4d1
treea54fda3ab474325c513a7981d0a8f8ec4063990a
parentf159927f4d15d820a6eb615e33d68780db035c8d
Unify ctf_fetch_registers and tfile_fetch_registers

Functions ctf_fetch_registers and tfile_fetch_registers have some
duplicated code about guessing the PC in regcache.  Sometimes, we
may change one function and forget to update the other one, like this
https://www.sourceware.org/ml/gdb-patches/2014-01/msg00292.html

This patch is to move the duplicated code into a new function
tracefile_fetch_registers, and let both ctf_fetch_registers and
tfile_fetch_registers call it.

gdb:

2014-04-22  Yao Qi  <yao@codesourcery.com>

* tracefile-tfile.c (tfile_fetch_registers): Move the bottom to ...
* tracefile.c (tracefile_fetch_registers): ... it.  New function.
* tracefile.h (tracefile_fetch_registers): Declare.
* ctf.c (ctf_fetch_registers): Remove the bottom.  Call
tracefile_fetch_registers.
gdb/ChangeLog
gdb/ctf.c
gdb/tracefile-tfile.c
gdb/tracefile.c
gdb/tracefile.h
This page took 0.026056 seconds and 4 git commands to generate.