Re: C++ to Low level language
Re: C++ to Low level language
- Subject: Re: C++ to Low level language
- From: Dmitry Markman <email@hidden>
- Date: Thu, 07 Jul 2011 19:19:35 -0400
if you use gdb for debugging
you can simply use disassemble command
if you use lldb for debugging there is an even better options
disassemble -p -m
it will show you both disassemble and original c++ code
something like
45 B b("Hello, Worlds!");
-> 46 std::string s("Hello, World!");
47 std::cout << s << " " << b[0] << std::endl;
-> 0x10000150f: movq %rdi, -112(%rbp)
0x100001513: callq 0x100001aba ; std::allocator<char>::allocator()
0x100001518: leaq -72(%rbp), %rdi
0x10000151c: leaq 1892(%rip), %rsi ; 0x100001c87 "Hello, World!"
also gcc has the switch -S so it will disassemble whole file
On Jul 7, 2011, at 12:52 PM, Marco S Hyman wrote:
> On Jul 7, 2011, at 9:38 AM, Jos Timanta Tarigan wrote:
>
>> Im not that familiar with this (flag?), how can I use this?
>
> From the command line. Start with "man otool". "otool -tv ..."
> will disassemble the entire text segment. There are lots of other
> options.
>
> /\/\arc
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Dmitry Markman
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden