diff options
author | Yao Qi <yao@codesourcery.com> | 2014-04-18 19:32:01 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-04-22 09:21:55 +0800 |
commit | 48b6e87ef297136a6409c2c993c4626f28bbb4d1 (patch) | |
tree | a54fda3ab474325c513a7981d0a8f8ec4063990a /gdb/tracefile.h | |
parent | f159927f4d15d820a6eb615e33d68780db035c8d (diff) | |
download | binutils-gdb-48b6e87ef297136a6409c2c993c4626f28bbb4d1.tar.gz |
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.
Diffstat (limited to 'gdb/tracefile.h')
-rw-r--r-- | gdb/tracefile.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/tracefile.h b/gdb/tracefile.h index db454e31077..54853708291 100644 --- a/gdb/tracefile.h +++ b/gdb/tracefile.h @@ -113,4 +113,6 @@ extern struct trace_file_writer *tfile_trace_file_writer_new (void); extern void init_tracefile_ops (struct target_ops *ops); +extern void tracefile_fetch_registers (struct regcache *regcache, int regno); + #endif /* TRACEFILE_H */ |