From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F3A083857C4F; Thu, 30 Sep 2021 10:02:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3A083857C4F From: "shivam98.tkg at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/28371] gdb: watchpoint for local variable doesn't work on RISC-V Date: Thu, 30 Sep 2021 10:02:10 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: shivam98.tkg at gmail 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2021 10:02:11 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28371 --- Comment #11 from shivam98.tkg at gmail dot com --- OK, applying the diff that reverts that D69723 patch didn't work. clang does emit function epilog CFI info. but debugging didn't work as expected. clang new riscv assembly for function func2 :- .type func2,@function 59 func2: # @func2 60 .Lfunc_begin1: 61 .loc 1 30 0 # watch-cond.c:30:0 62 .cfi_startproc 63 # %bb.0: 64 addi sp, sp, -32 65 .cfi_def_cfa_offset 32 66 sd ra, 24(sp) # 8-byte Folded Spill 67 sd s0, 16(sp) # 8-byte Folded Spill 68 .cfi_offset ra, -8 69 .cfi_offset s0, -16 70 addi s0, sp, 32 71 .cfi_def_cfa s0, 0 72 sd a0, -24(s0) 73 .Ltmp2: 74 .loc 1 31 10 prologue_end # watch-cond.c:31:10 75 lui a1, %hi(global2) 76 lw a0, %lo(global2)(a1) 77 addiw a0, a0, 1 78 sw a0, %lo(global2)(a1) 79 .loc 1 32 1 # watch-cond.c:32:1 80 ld s0, 16(sp) # 8-byte Folded Reload 81 .cfi_def_cfa sp, -32 82 ld ra, 24(sp) # 8-byte Folded Reload 83 .cfi_restore ra 84 .cfi_restore s0 85 addi sp, sp, 32 86 .cfi_def_cfa_offset 0 87 ret 88 .Ltmp3: 89 .Lfunc_end1: 90 .size func2, .Lfunc_end1-func2 91 .cfi_endproc 92 # -- End function 93 .globl main # -- Begin function main 94 .p2align 1 95 .type main,@function Any Idea @Jim Wilson what else gdb expecting? Sorry for troubling you and t= he forum. I attached the clang-riscv, clang-x86, and gcc-riscv assembly and patch diff file that I applied on llvm-project to generate the new assembly. --=20 You are receiving this mail because: You are on the CC list for the bug.=