diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-09-15 18:02:51 +0200 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-09-15 18:02:51 +0200 |
commit | 124aceb46dfd1f836f35d6075ead4e00e705f6f3 (patch) | |
tree | 768d8a85c5f426f44ac969495512cf1a99e0cfa5 /gdb/gdbserver/lynx-low.c | |
parent | 96cde54f0adf2315404f3eba35dc3dfbc57f98c8 (diff) | |
download | gdb-124aceb46dfd1f836f35d6075ead4e00e705f6f3.zip gdb-124aceb46dfd1f836f35d6075ead4e00e705f6f3.tar.gz gdb-124aceb46dfd1f836f35d6075ead4e00e705f6f3.tar.bz2 |
gdbserver: Remove thread_to_gdb_id
As explained in the previous patch, the gdb_id concept is no longer
relevant. The function thread_to_gdb_id is trivial, it returns the
thread's ptid. Remove it and replace its usage with ptid_of.
The changes in nto-low.c and lynx-low.c are fairly straightforward, but
I was not able to build test them.
gdb/gdbserver/ChangeLog:
* inferiors.h (thread_to_gdb_id): Remove.
* inferiors.c (thread_to_gdb_id): Remove.
* server.c (handle_qxfer_threads_worker, handle_query): Adjust.
* lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
lynx_store_registers, lynx_read_memory, lynx_write_memory):
Likewise.
* nto-low.c (nto_fetch_registers, nto_store_registers,
nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
Diffstat (limited to 'gdb/gdbserver/lynx-low.c')
-rw-r--r-- | gdb/gdbserver/lynx-low.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index 77f570e..f074dd5 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -350,7 +350,7 @@ lynx_resume (struct thread_resume *resume_info, size_t n) the moment we resume its execution for the first time. It is fine to use the current_thread's ptid in those cases. */ if (ptid_equal (ptid, minus_one_ptid)) - ptid = thread_to_gdb_id (current_thread); + ptid = ptid_of (current_thread); regcache_invalidate_pid (ptid_get_pid (ptid)); @@ -423,7 +423,7 @@ lynx_wait_1 (ptid_t ptid, struct target_waitstatus *status, int options) ptid_t new_ptid; if (ptid_equal (ptid, minus_one_ptid)) - pid = lynx_ptid_get_pid (thread_to_gdb_id (current_thread)); + pid = lynx_ptid_get_pid (ptid_of (current_thread)); else pid = BUILDPID (lynx_ptid_get_pid (ptid), lynx_ptid_get_tid (ptid)); @@ -612,7 +612,7 @@ static void lynx_fetch_registers (struct regcache *regcache, int regno) { struct lynx_regset_info *regset = lynx_target_regsets; - ptid_t inferior_ptid = thread_to_gdb_id (current_thread); + ptid_t inferior_ptid = ptid_of (current_thread); lynx_debug ("lynx_fetch_registers (regno = %d)", regno); @@ -637,7 +637,7 @@ static void lynx_store_registers (struct regcache *regcache, int regno) { struct lynx_regset_info *regset = lynx_target_regsets; - ptid_t inferior_ptid = thread_to_gdb_id (current_thread); + ptid_t inferior_ptid = ptid_of (current_thread); lynx_debug ("lynx_store_registers (regno = %d)", regno); @@ -673,7 +673,7 @@ lynx_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) int buf; const int xfer_size = sizeof (buf); CORE_ADDR addr = memaddr & -(CORE_ADDR) xfer_size; - ptid_t inferior_ptid = thread_to_gdb_id (current_thread); + ptid_t inferior_ptid = ptid_of (current_thread); while (addr < memaddr + len) { @@ -706,7 +706,7 @@ lynx_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len) int buf; const int xfer_size = sizeof (buf); CORE_ADDR addr = memaddr & -(CORE_ADDR) xfer_size; - ptid_t inferior_ptid = thread_to_gdb_id (current_thread); + ptid_t inferior_ptid = ptid_of (current_thread); while (addr < memaddr + len) { @@ -742,7 +742,7 @@ lynx_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len) static void lynx_request_interrupt (void) { - ptid_t inferior_ptid = thread_to_gdb_id (get_first_thread ()); + ptid_t inferior_ptid = ptid_of (get_first_thread ()); kill (lynx_ptid_get_pid (inferior_ptid), SIGINT); } |