From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 96218385B835 for ; Mon, 30 Mar 2020 13:20:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 96218385B835 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02UD55IY001644 for ; Mon, 30 Mar 2020 09:20:11 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 3020wcmfe1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Mar 2020 09:20:11 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Mar 2020 14:20:00 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 30 Mar 2020 14:19:58 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02UDK5iR12911048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Mar 2020 13:20:05 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C542A11C069; Mon, 30 Mar 2020 13:20:05 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B592D11C06C; Mon, 30 Mar 2020 13:20:05 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.145.78.76]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 30 Mar 2020 13:20:05 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 93BE3D803A2; Mon, 30 Mar 2020 15:04:54 +0200 (CEST) Subject: Re: [PATCH] [PowerPC] Fix debug register issues in ppc-linux-nat To: pedromfc@linux.ibm.com (Pedro Franco de Carvalho) Date: Mon, 30 Mar 2020 15:04:54 +0200 (CEST) From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20200327185422.28435-1-pedromfc@linux.ibm.com> from "Pedro Franco de Carvalho" at Mar 27, 2020 03:54:22 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 20033013-0008-0000-0000-000003672471 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20033013-0009-0000-0000-00004A88A4DE Message-Id: <20200330130454.93BE3D803A2@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-30_01:2020-03-27, 2020-03-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 phishscore=0 mlxlogscore=762 adultscore=0 suspectscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003300121 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 13:20:21 -0000 Pedro Franco de Carvalho wrote: > This patch fixes some issues with debug register handling for the powerpc > linux native target. OK, let's go with this version. Thanks again! > gdb/ChangeLog: > YYYY-MM-DD Pedro Franco de Carvalho > > * ppc-linux-nat.c: Include , , and > . Remove inclusion of observable.h. > (PPC_DEBUG_CURRENT_VERSION): Move up define. > (struct arch_lwp_info): New struct. > (class ppc_linux_dreg_interface): New class. > (struct ppc_linux_process_info): New struct. > (struct ppc_linux_nat_target) > > > > > > > > > : Declare as > methods. > : New inner struct. > : Declare > members. > (saved_dabr_value, hwdebug_info, max_slots_number) > (struct hw_break_tuple, struct thread_points, ppc_threads) > (have_ptrace_hwdebug_interface) > (hwdebug_find_thread_points_by_tid) > (hwdebug_insert_point, hwdebug_remove_point): Remove. > (ppc_linux_nat_target::can_use_hw_breakpoint): Use > m_dreg_interface, remove call to PTRACE_SET_DEBUGREG. > (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment, > use m_dreg_interface. > (hwdebug_point_cmp): Change to... > (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use > reference arguments instead of pointers. > (ppc_linux_nat_target::ranged_break_num_registers): Use > m_dreg_interface. > (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use > m_dreg_interface. Call register_hw_breakpoint. > (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use > m_dreg_interface. Call clear_hw_breakpoint. > (get_trigger_type): Change to... > (ppc_linux_nat_target::get_trigger_type): ...this method. Add > comment. > (ppc_linux_nat_target::insert_mask_watchpoint): Update comment, > use m_dreg_interface. Call register_hw_breakpoint. > (ppc_linux_nat_target::remove_mask_watchpoint): Update comment, > use m_dreg_interface. Call clear_hw_breakpoint. > (can_use_watchpoint_cond_accel): Change to... > (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this > method. Update comment, use m_dreg_interface and > m_process_info. > (calculate_dvc): Change to... > (ppc_linux_nat_target::calculate_dvc): ...this method. Use > m_dreg_interface. > (num_memory_accesses): Change to... > (ppc_linux_nat_target::num_memory_accesses): ...this method. > (check_condition): Change to... > (ppc_linux_nat_target::check_condition): ...this method. > (ppc_linux_nat_target::can_accel_watchpoint_condition): Update > comment, use m_dreg_interface. > (create_watchpoint_request): Change to... > (ppc_linux_nat_target::create_watchpoint_request): ...this > method. Use m_dreg_interface. > (ppc_linux_nat_target::insert_watchpoint): Add comment, use > m_dreg_interface. Call register_hw_breakpoint or register_wp. > (ppc_linux_nat_target::remove_watchpoint): Add comment, use > m_dreg_interface. Call clear_hw_breakpoint or clear_wp. > (ppc_linux_nat_target::low_forget_process) > (ppc_linux_nat_target::low_new_fork) > (ppc_linux_nat_target::low_new_clone) > (ppc_linux_nat_target::low_delete_thread) > (ppc_linux_nat_target::low_prepare_to_resume): New methods. > (ppc_linux_nat_target::low_new_thread): Remove previous logic, > only call mark_thread_stale. > (ppc_linux_thread_exit): Remove. > (ppc_linux_nat_target::stopped_data_address): Change to... > (ppc_linux_nat_target::low_stopped_data_address): This. Add > comment, use m_dreg_interface and m_thread_hw_breakpoints. > (ppc_linux_nat_target::stopped_by_watchpoint): Change to... > (ppc_linux_nat_target::stopped_by_watchpoint): This. Add > comment. Call low_stopped_data_address. > (ppc_linux_nat_target::watchpoint_addr_within_range): Use > m_dreg_interface. > (ppc_linux_nat_target::masked_watch_num_registers): Use > m_dreg_interface. > (ppc_linux_nat_target::copy_thread_dreg_state) > (ppc_linux_nat_target::mark_thread_stale) > (ppc_linux_nat_target::mark_debug_registers_changed) > (ppc_linux_nat_target::register_hw_breakpoint) > (ppc_linux_nat_target::clear_hw_breakpoint) > (ppc_linux_nat_target::register_wp) > (ppc_linux_nat_target::clear_wp) > (ppc_linux_nat_target::init_arch_lwp_info) > (ppc_linux_nat_target::get_arch_lwp_info): New methods. > (_initialize_ppc_linux_nat): Remove observer callback. This is OK. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com