• 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: How many bytes is an instruction?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How many bytes is an instruction?


  • Subject: Re: How many bytes is an instruction?
  • From: Rick Mann <email@hidden>
  • Date: Wed, 24 Jul 2013 13:37:30 -0700

On Jul 24, 2013, at 13:32 , Ken Thomases <email@hidden> wrote:

> No.  Instructions take variable numbers of bytes.  Any disassembly should either list the address or the offset (in hex, probably) of each instruction.  So, you find the -myMethod: address, add the offset, and then find the line with that address.

Unfortunately, it does not. Here's a snippet.

	.align	4, 0x90
"-[GCS cacheSaveCard:forPlayer:lastModified:]": ## @"\01-[GCS cacheSaveCard:forPlayer:lastModified:]"
	.cfi_startproc
Lfunc_begin20:
	.loc	1 472 0                 ## /Users/rmann/Projects/Clients/RedBirdStudios/repo/GCClientTest/trunk/GCClientTest/GCS.m:472:0
## BB#0:
	pushl	ëp
Ltmp269:
	.cfi_def_cfa_offset 8
Ltmp270:
	.cfi_offset ëp, -8
	movl	%esp, ëp
Ltmp271:
	.cfi_def_cfa_register ëp
	pushl	ëx
	pushl	íi
	pushl	%esi
	subl	$236, %esp
Ltmp272:
	.cfi_offset %esi, -20
Ltmp273:
	.cfi_offset íi, -16
Ltmp274:
	.cfi_offset ëx, -12
	calll	L20$pb
L20$pb:
	popl	êx
	movl	24(ëp), ìx
	movl	20(ëp), íx
	movl	16(ëp), %esi
	movl	12(ëp), íi
	movl	8(ëp), ëx
	movl	ëx, -16(ëp)
	movl	íi, -20(ëp)
	movl	%esi, (%esp)
	movl	êx, -84(ëp)         ## 4-byte Spill
	movl	ìx, -88(ëp)         ## 4-byte Spill



--
Rick




 _______________________________________________
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


  • Follow-Ups:
    • Re: How many bytes is an instruction?
      • From: Wim Lewis <email@hidden>
References: 
 >How many bytes is an instruction? (From: Rick Mann <email@hidden>)
 >Re: How many bytes is an instruction? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: How many bytes is an instruction?
  • Next by Date: Re: How many bytes is an instruction?
  • Previous by thread: Re: How many bytes is an instruction?
  • Next by thread: Re: How many bytes is an instruction?
  • Index(es):
    • Date
    • Thread