public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "development at efficientek dot com" <sourceware-bugzilla@sourceware.org> 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 [thread overview] Message-ID: <bug-29930-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29930 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 => 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 <grub_cmd_read+215> 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 '=>', 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 instructions that do, like je, have the symbol. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-12-21 22:18 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-21 22:18 development at efficientek dot com [this message] 2023-02-10 18:44 ` [Bug gdb/29930] " tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29930-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).