From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F36B3858D32; Wed, 6 Sep 2023 04:29:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F36B3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693974599; bh=lfgHyrljuknxqASy5rCjdZxtFMXCbClE5W70ZT7+x/w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YTPpiued/mGOiSpavqELW1Ir9SHeb1D5QcgD5vD6TFvC/Kla6DAfvks46xG17F6r1 ug7wlLyGLfA6QVQPDNND/mqkJTLKkKKTYbcBdh14zlF5YYDKA6BHb6cnShS26zgsLj pVpSKKFzMCdZnk0gDbwtqP2U35PpEAJzHEJvXp+Q= From: "rajesh.palla at amd dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/30825] GDB doesn't send Hg packet when switching the inferiors Date: Wed, 06 Sep 2023 04:29:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rajesh.palla at amd dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30825 --- Comment #2 from Palla, Rajesh --- This is the new target we added for AMD cores. pc_unwind function is similar to default pc_unwind() except that it invalid= ates the cache when there is a change in the inferior. static CORE_ADDR aiengine_unwind_pc (struct gdbarch *gdbarch, struct frame_= info *next_frame) { gdb_byte buf[4]; struct inferior *inf =3D current_inferior (); if (inf->pid !=3D prev_pid){ prev_pid =3D inf->pid; get_current_regcache()->invalidate(gdbarch_pc_regnum (gdbarch)); } frame_unwind_register (next_frame, gdbarch_pc_regnum (gdbarch), buf); return extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_p= tr); } Couple of questions: 1. When I tried to debug "arm arch", I see the Hg packets are sent every ti= me we switch the inferior without doing any operation. (see log.txt attached) 2. In our case, I don't see Hg packet being sent lazily when we give 'c&' command. See the below log. But for other commands like mem read, I see Hg packet being sent. ----(gdb) infe 1 GDB -> $Hgp1.1#af GDB <- $OK#9a GDB -> $g#67 GDB <- $0000....#df ----(gdb) infe 2 ----(gdb) c & GDB -> $vCont;c:p2.-1#10 GDB <- $OK#9a ----(gdb) infe 1 ----(gdb) b producer GDB -> $m280,4#67 GDB <- $00000000#80 GDB -> $Z0,280,4#b0 GDB <- $OK#9a --=20 You are receiving this mail because: You are on the CC list for the bug.=