From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from s01.bc.larksuite.com (s01.bc.larksuite.com [209.127.230.16]) by sourceware.org (Postfix) with UTF8SMTPS id 4B6E93858D32 for ; Wed, 19 Jul 2023 07:59:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B6E93858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=spacemit.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=spacemit.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2303021642; d=spacemit.com; t=1689753565; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=szU7hbuc9k/Qn5Az/VCk1/yI+xxA1v7fdoB0OD/lX7w=; b=xBScaLhRRrVHUQi+ikOs7OugNx8AV36p7XqWVh41HG3+ORPWB7lRPb2ZbMV4Rh3H2DXY5V MpDsuCgWbUEqO0yAbXeNPHoCTvGDa6IuCFTWvsHMRpBnsaoM7VeCxpjrhnkdN/rFmuyIyc Js9MmNTdzzajxTNvbBHveYyESVvKZ1qYFUjOryByTgTCmiv3yOcWi3kO+r6jp43SahecQd rOuKDacM/JEnU9l4gEcdeQVcHHBriyrUw1OPaXeiwaWm4gOvRvi5hLbkd0MobaUxfo+4fQ LihGzJTtE06jQkAx3PVN9s/25uWD3grPLUj0g7DLRmVdUPhBB9QCwQgKe/0krA== Message-Id: <16c8bb4f69de36253945d0fb7891fb770dd49697.5b4244aa.a4ef.425c.9c3b.f2b37af9ec63@feishu.cn> To: "gdb@sourceware.org" Subject: =?UTF-8?q?why_gdb_try_to_read_address_0x0_when_I_set_$pc=EF=BC=8Chow_to_s?= =?UTF-8?q?uppress_this_behavior=3F?= From: =?utf-8?q?=E5=BA=84=E7=A7=8B=E5=BD=AC?= Mime-Version: 1.0 X-Lms-Return-Path: Content-Type: multipart/alternative; boundary=fd83df34711f3cb3b57c9855448cf81849153cad3bd1aa8a1c2ef65aa229 Date: Wed, 19 Jul 2023 15:59:24 +0800 X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_80,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --fd83df34711f3cb3b57c9855448cf81849153cad3bd1aa8a1c2ef65aa229 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hi, I use gdb with openocd to debug a riscv board, and found that when set $pc= =3Dxxx(a non-zero value) in gdb, gdb would first read the address 0x0, whic= h caused an error on this riscv device. Is there any documentation or suggestions for reading the source code to so= lve this problem?=C2=A0 Thanks This message and any attachment are confidential and may be privileged or o= therwise protected from disclosure. If you are not an intended recipient of= this message, please delete it and any attachment from your system and not= ify the sender immediately by reply e-mail. Unintended recipients should no= t use, copy, disclose or take any action based on this message or any infor= mation contained in this message. Emails cannot be guaranteed to be secure = or error free as they can be intercepted, amended, lost or destroyed, and y= ou should take full responsibility for security checking.=20 =20 =E6=9C=AC=E9=82=AE=E4=BB=B6=E5=8F=8A=E5=85=B6=E4=BB=BB=E4=BD=95=E9=99=84=E4= =BB=B6=E5=85=B7=E6=9C=89=E4=BF=9D=E5=AF=86=E6=80=A7=E8=B4=A8=EF=BC=8C=E5=B9= =B6=E5=8F=AF=E8=83=BD=E5=8F=97=E5=85=B6=E4=BB=96=E4=BF=9D=E6=8A=A4=E6=88=96= =E4=B8=8D=E5=85=81=E8=AE=B8=E8=A2=AB=E6=8A=AB=E9=9C=B2=E7=BB=99=E7=AC=AC=E4= =B8=89=E6=96=B9=E3=80=82=E5=A6=82=E9=98=81=E4=B8=8B=E8=AF=AF=E6=94=B6=E5=88= =B0=E6=9C=AC=E9=82=AE=E4=BB=B6=EF=B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B=E4=BD= =95=E5=B7=AE=E9=94=99=E7=9A=84=E9=80=9A=E4=BF=A1=E6=96=B9=E5=BC=8F=EF=BC=8C= =E5=8F=AF=E8=83=BD=E4=BC=9A=E8=A2=AB=E6=8B=A6=E6=88=AA=E3=80=81=E4=BF=AE=E6= =94=B9=E3=80=81=E4=B8=A2=E5=A4=B1=E6=88=96=E6=8D=9F=E5=9D=8F=EF=BC=8C=E6=94= =B6=E4=BB=B6=E4=BA=BA=E9=9C=80=E8=87=AA=E8=A1=8C=E8=B4=9F=E8=B4=A3=E5=81=9A= =E5=A5=BD=E5=AE=89=E5=85=A8=E6=A3=80=E6=9F=A5=E3=80=82 --fd83df34711f3cb3b57c9855448cf81849153cad3bd1aa8a1c2ef65aa229--