diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-01-18 15:03:18 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-01-18 15:03:18 +0000 |
commit | 6f69e520676f5f434cf43c250865036b3d516429 (patch) | |
tree | 97ebabc257ca590604be2b9e3d28b72e61804a84 /gdb/gdbserver/linux-low.h | |
parent | 276d4552dfc2dc3906fa2bd8690ea85b3d8ec055 (diff) | |
download | gdb-6f69e520676f5f434cf43c250865036b3d516429.zip gdb-6f69e520676f5f434cf43c250865036b3d516429.tar.gz gdb-6f69e520676f5f434cf43c250865036b3d516429.tar.bz2 |
Replace some $ARCH_{get,set}_pc with linux_{get,set}_pc_64bit
This patch is the follow-up of
https://sourceware.org/ml/gdb-patches/2016-01/msg00164.html to provide
linux_{get,set}_pc_64bit functions.
Rebuild GDBserver with tilegx-linux-gcc. Not tested.
I think about pc in Tile-GX a little bit. Looks current Tile-GX
supports debugging 32-bit program (multi-arch), but PC is always
64-bit. See this thread
https://sourceware.org/ml/gdb-patches/2013-02/msg00113.html
and GDBserver reads PC as 64-bit through ptrace. However, if
the inferior is 32-bit, the PC in the target description and
regcache is 32-bit, so only 32-bit contents are sent back GDB.
Anyway, Tile-GX GDBserver may have some problems here, but this
patch doesn't change anything.
gdb/gdbserver:
2016-01-18 Yao Qi <yao.qi@linaro.org>
* linux-low.c (linux_set_pc_64bit): New function.
(linux_get_pc_64bit): New function.
* linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
Declare.
* linux-sparc-low.c (debug_threads): Remove declaration.
(sparc_get_pc): Remove.
(the_low_target): Use linux_get_pc_64bit instead of
sparc_get_pc.
* linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
(the_low_target): Use linux_get_pc_64bit and
linux_set_pc_64bit.
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r-- | gdb/gdbserver/linux-low.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h index 98a331d..4845862 100644 --- a/gdb/gdbserver/linux-low.h +++ b/gdb/gdbserver/linux-low.h @@ -395,6 +395,9 @@ void initialize_low_arch (void); void linux_set_pc_32bit (struct regcache *regcache, CORE_ADDR pc); CORE_ADDR linux_get_pc_32bit (struct regcache *regcache); +void linux_set_pc_64bit (struct regcache *regcache, CORE_ADDR pc); +CORE_ADDR linux_get_pc_64bit (struct regcache *regcache); + /* From thread-db.c */ int thread_db_init (void); void thread_db_detach (struct process_info *); |