Re: Why does `disassemble` behave differently on Linux and Mac?

Peng Yu via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CABrM6wkkkAxP+tPJ9NKyrNQvgAoYFgkMeXtiNJEVZqNKtBVV0g@mail.gmail.com>
Adding -g to gcc make `disassemble func` works. Why is it required on
Mac but not on Linux?

On 1/24/21, Eli Zaretskii <[email protected]> wrote:
>> Date: Sun, 24 Jan 2021 09:06:10 -0600
>> From: Peng Yu via Gdb <[email protected]>
>>
>> $ 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.