From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic312-20.consmr.mail.bf2.yahoo.com (sonic312-20.consmr.mail.bf2.yahoo.com [74.6.128.82]) by sourceware.org (Postfix) with ESMTPS id C268A383D80F for ; Wed, 11 Aug 2021 14:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C268A383D80F X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1628690951; bh=J7NIke7xa+NBmn9R1azj7Z3HS1o9YBS5U5Jc0RZliAd=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=oDKnXLujMnGDdvXHyxv9zk/FOVB8TlQz4iWq7FzMRPdobHg7hO5JrACnFP6kUNFEsw3HdWS8V57uFdc3us7w/y8H2HlGF/JrLqaZX9RJSvjlLyMMDWxXOdXb6+8OKHspvdE3bFpGOYmhlT9WXprxFetXUTvI8yuuqtNi+6xvCVeMLXQAdYZfrYctVdZJrtBCKcd2ylvECm5tyhmkOL7iP2HETrKel5GSjKp6xE3q85GkqIHHkWy/ynaSbRCIvNY8zh7wCpjP6vRLH1C6mQ7sLgVpIZKUdewJMPbT/0t6RMXgF57rHd1oyuy+srFoLiOuMlRRj4UqDhDar9OMWC4aCQ== X-YMail-OSG: 8aEHx90VM1kgTmWIUuUqLk7GKmicuWvvB.AiKAOd6glgwBJek.BmEibrPp8fqk6 vYERfC6.A8ooAY2yHSLWFN9wvhFVkoR84d.cxjlKpNcI25Fo.cTrHUXjIGQ6PjRpFZ6aAlEkBPjd MjKVF7GAFyivbiwOj6zGhg9MTozYzBHMTZL6YyDyhxVVCbPKvrRLcxpVjZ6qF4n0bpmdugO0x1az 6igsd5aYmS0g8Hw4Mv2yMqLcfman2zyz2GmXmF4LPkPbZ8pStdJ8TL5I62nXOIXt4RJ9vx3tD9.Y O6fL2XW9nWoKniGMv1.YV9z_rngyaWo3oOWrtyXpT3afHYg.Hrewg.e7auciqUREf.W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8aSGoShd07.BwfeB_8bLSXs9PvDFkLibyRmyJkCvmIF3XYjOzh2O dMxjOt6ND_UnX2URKY.sjOnT8uJbf93R2aPR7Aa04cKCReso- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Wed, 11 Aug 2021 14:09:11 +0000 Date: Wed, 11 Aug 2021 14:09:06 +0000 (UTC) From: Mahmood Naderan Reply-To: Mahmood Naderan To: Martin Simmons Cc: "gdb@sourceware.org" Message-ID: <668903330.868573.1628690946039@mail.yahoo.com> In-Reply-To: References: <526939713.188425.1628429312671.ref@mail.yahoo.com> <526939713.188425.1628429312671@mail.yahoo.com> Subject: Re: How to check if .gdbinit macros have been loaded? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.18796 YMailNorrin X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2021 14:09:22 -0000 >What makes you think these commands (macros) will be called >automatically?=C2=A0 I think you have to call them yourself from the gdb >command line.=20 >BTW, the "show user" command will tell you if a particular user defined command exists. Hi Martin, Yes if I run ''show user" I see the functions defined in the .gdbinit file. I tried your suggestion by manually calling one of the functions which is '= dp 3' [1]. However, it fails with the following error: accel-sim.out: shader.cc:1657: unsigned int shader_core_ctx::translate_loca= l_memaddr(address_type, unsigned int, unsigned int, unsigned int, new_addr_= type*): Assertion `localaddr % 4 =3D=3D 0' failed. Program received signal SIGABRT, Aborted. __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:50 50=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ../sysdeps/unix/sysv/linux/raise.c: No suc= h file or directory. (gdb) dp 3 Dumping pipeline state... Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7ba9468 in gpgpu_sim::dump_pipeline (this=3D0x0, mask=3D69, s=3D= 3, m=3D0) at gpu-sim.cc:2028 2028=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for (unsigned i =3D 0; i < m_shader_conf= ig->n_simt_clusters; i++) { The program being debugged was signaled while in a function called from GDB= . GDB has restored the context to what it was before the call. To change this behavior use "set unwindonsignal off". Evaluation of the expression containing the function (gpgpu_sim::dump_pipeline(int, int, int) const) will be abandoned. I don't know if the .gdbinit functions can be used after the program receiv= es segmentation fault. Any thoughts on that? [1] https://github.com/gpgpu-sim/gpgpu-sim_distribution/blob/master/.gdbini= t#L10 Regards, Mahmood On Monday, August 9, 2021, 4:31:34 PM GMT+2, Martin Simmons wrote:=20 >>>>> On Sun, 8 Aug 2021 13:28:32 +0000 (UTC), Mahmood Naderan via Gdb said= : >=20 > Hi >=20 > I use a .gdbinit [1] file which is supposed to print some debug informati= on when the program is being run.=20 > When I run GDB, the first printf is written on the screen. So, that means= the .gdbinit file has been loaded. > However, I don't see the rest of the information that must be printed on = the screen. There are a lot of printf for this purpose. The other printfs are inside define ... end, so you will only see them when the named command is used. > How can I be sure that the rest of the macros are called? Maybe they hit = errors and I am not able to see those errors. What makes you think these commands (macros) will be called automatically?=C2=A0 I think you have to call them yourself from the gdb command line. BTW, the "show user" command will tell you if a particular user defined command exists. __Martin