From: Peng Yu via Gdb <gdb@sourceware.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sourceware.org
Subject: Re: Why does `disassemble` behave differently on Linux and Mac?
Date: Sun, 24 Jan 2021 10:01:05 -0600 [thread overview]
Message-ID: <CABrM6wkkkAxP+tPJ9NKyrNQvgAoYFgkMeXtiNJEVZqNKtBVV0g@mail.gmail.com> (raw)
In-Reply-To: <835z3m4abq.fsf@gnu.org>
Adding -g to gcc make `disassemble func` works. Why is it required on
Mac but not on Linux?
On 1/24/21, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sun, 24 Jan 2021 09:06:10 -0600
>> From: Peng Yu via Gdb <gdb@sourceware.org>
>>
>> $ gcc -c func.c
>> $ gdb -q func.o
>> Reading symbols from func.o...
>> (No debugging symbols found in func.o)
>> (gdb) show disassembly-flavor
>> The disassembly flavor is "att".
>> (gdb) disassemble func
>> No symbol table is loaded. Use the "file" command.
>
> I think you need to compile with -g.
>
--
Regards,
Peng
prev parent reply other threads:[~2021-01-24 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-24 15:06 Peng Yu via Gdb
2021-01-24 15:31 ` Simon Marchi via Gdb
2021-01-24 15:35 ` Eli Zaretskii via Gdb
2021-01-24 16:01 ` Peng Yu via Gdb [this message]
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=CABrM6wkkkAxP+tPJ9NKyrNQvgAoYFgkMeXtiNJEVZqNKtBVV0g@mail.gmail.com \
--to=gdb@sourceware.org \
--cc=eliz@gnu.org \
--cc=pengyu.ut@gmail.com \
/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: link
Be 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