From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 07E913858289; Wed, 21 Dec 2022 22:18:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07E913858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671661135; bh=mtap1Aznvl83kpUgOxMkR9M0SRLYdYhC+IqooemsSIU=; h=From:To:Subject:Date:From; b=FQuEdKer/ECmdoHwG8oQO/sGD710lXsOvC04xKuFV6GiqGqmmbFKb/UPv4L/ioJ9M zF4YZ2amuMGuz8IVKplOm4DtnHiqPxMDGEH6YROAqIzx8pfIzY92bkGfwn0+dDdGA4 G4HpWihNhjoxYftgtxoNrZC0Bj1LI5okUZZXojXY= From: "development at efficientek dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/29930] New: disassemble does not show symbol name sometimes Date: Wed, 21 Dec 2022 22:18:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: development at efficientek 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D29930 Bug ID: 29930 Summary: disassemble does not show symbol name sometimes Product: gdb Version: 12.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: development at efficientek dot com Target Milestone: --- Here is the output of disassemble that shows this issue: (gdb) disassemble Dump of assembler code for function grub_cmd_read: 0x000000007bec6720 <+0>: push %r15 0x000000007bec6722 <+2>: push %r14 0x000000007bec6724 <+4>: push %r13 0x000000007bec6726 <+6>: push %r12 0x000000007bec6728 <+8>: mov %esi,%r12d 0x000000007bec672b <+11>: push %rbp 0x000000007bec672c <+12>: push %rbx 0x000000007bec672d <+13>: sub $0x18,%rsp 0x000000007bec6731 <+17>: mov 0x8(%rdi),%rax =3D> 0x000000007bec6735 <+21>: mov $0x5,%edi 0x000000007bec673a <+26>: mov %rdx,0x8(%rsp) 0x000000007bec673f <+31>: mov (%rax),%r14d 0x000000007bec6742 <+34>: movabs $0x7da81596,%rax 0x000000007bec674c <+44>: call *%rax 0x000000007bec674e <+46>: test %rax,%rax 0x000000007bec6751 <+49>: je 0x7bec67f7 0x000000007bec6757 <+55>: movabs $0x7da87eff,%r15 0x000000007bec6761 <+65>: mov %rax,%rbp ... (gdb) info symbol 0x7da81596 grub_malloc in section .text of /home/grub-tester/bootloader/build/obj-x86_64-efi/grub-core/kernel.exec We can see here that gdb knows of symbol grub_malloc at 0x7da81596, however= , in the disassembly at the second line below the one starting with '=3D>', the = value $0x7da81596 is not substituted for "grub_malloc". Perhaps this can be turned on by setting special flags to the disassembler,= but I've not encountered any. Nor have I seen any gdb settings that might turn = this on. I believe this happens for all literals that are in instructions that do not potentially change the instruction pointer, like movabs, whereas instructio= ns that do, like je, have the symbol. --=20 You are receiving this mail because: You are on the CC list for the bug.=