• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C++ to Low level language
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Fw: C++ to Low level language (From: Jos Timanta Tarigan <email@hidden>)
 >Re: C++ to Low level language (From: Jens Alfke <email@hidden>)
 >Re: C++ to Low level language (From: Jos Timanta Tarigan <email@hidden>)
 >Re: C++ to Low level language (From: Marco S Hyman <email@hidden>)

  • Prev by Date: Re: Linking Against stdlibc++
  • Next by Date: Re: Linking Against stdlibc++
  • Previous by thread: Re: C++ to Low level language
  • Next by thread: Linking Against stdlibc++
  • Index(es):
    • Date
    • Thread