[binutils-gdb] gdb: LoongArch: Remove loongarch_lookup_debug_reg_state()

Tiezhu Yang yangtiezhu@sourceware.org
Wed Jan 15 13:32:29 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=072fa8ed047b5bffd8fca509b50cecfc9b090d34

commit 072fa8ed047b5bffd8fca509b50cecfc9b090d34
Author: Hui Li <lihui@loongson.cn>
Date:   Mon Jan 6 18:21:20 2025 +0800

    gdb: LoongArch: Remove loongarch_lookup_debug_reg_state()
    
    loongarch_lookup_debug_reg_state() is a unused function, so we
    can remove it.
    
    Signed-off-by: Hui Li <lihui@loongson.cn>
    Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

Diff:
---
 gdb/nat/loongarch-linux-hw-point.c | 13 -------------
 gdb/nat/loongarch-linux-hw-point.h |  5 -----
 2 files changed, 18 deletions(-)

diff --git a/gdb/nat/loongarch-linux-hw-point.c b/gdb/nat/loongarch-linux-hw-point.c
index 002553a5b51..9c39cceb336 100644
--- a/gdb/nat/loongarch-linux-hw-point.c
+++ b/gdb/nat/loongarch-linux-hw-point.c
@@ -220,19 +220,6 @@ loongarch_linux_get_debug_reg_capacity (int tid)
     }
 }
 
-/* Return the debug register state for process PID.  If no existing
-   state is found for this process, return nullptr.  */
-
-struct loongarch_debug_reg_state *
-loongarch_lookup_debug_reg_state (pid_t pid)
-{
-  auto it = loongarch_debug_process_state.find (pid);
-  if (it != loongarch_debug_process_state.end ())
-    return &it->second;
-
-  return nullptr;
-}
-
 /* Return the debug register state for process PID.  If no existing
    state is found for this process, create new state.  */
 
diff --git a/gdb/nat/loongarch-linux-hw-point.h b/gdb/nat/loongarch-linux-hw-point.h
index fb722aab50c..161db9270ff 100644
--- a/gdb/nat/loongarch-linux-hw-point.h
+++ b/gdb/nat/loongarch-linux-hw-point.h
@@ -108,11 +108,6 @@ void loongarch_linux_set_debug_regs (struct loongarch_debug_reg_state *state,
 
 void loongarch_linux_get_debug_reg_capacity (int tid);
 
-/* Return the debug register state for process PID.  If no existing
-   state is found for this process, return nullptr.  */
-
-struct loongarch_debug_reg_state *loongarch_lookup_debug_reg_state (pid_t pid);
-
 /* Return the debug register state for process PID.  If no existing
    state is found for this process, create new state.  */


More information about the Gdb-cvs mailing list