• 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: Finding assembly offset in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding assembly offset in code


  • Subject: Re: Finding assembly offset in code
  • From: Sean McBride <email@hidden>
  • Date: Fri, 07 Feb 2014 18:34:37 -0500
  • Organization: Rogue Research Inc.

On Fri, 7 Feb 2014 22:50:02 +0000, Mills, Steve said:

>If an app has symbols in it (e.g. crash log shows IAmAFunction instead
>of 0x12345678), is there an *easy* way to figure out where in the source
>the +n is? Like in the following, how can I find the + 431:
>
>0   com.makemusic.Finale          	0x002d7dde FinSpeedyWndProc(ECNTL,
>unsigned int, long, long) + 431
>
>I took the long way around and put a nil deref into the code, run and
>crash, then keep moving it down until I get a number just after the one
>reported in the original crash log. Blech.

These days, with lldb, the best solution is described here:

<http://lldb.llvm.org/symbolication.html>

I suggest reading the whole thing, but it just gets better and better as you go.  Basically, lldb has a slick 'crashlog' command!  You just do:

(lldb) command script import lldb.macosx.crashlog
(lldb) crashlog ~/Library/Logs/DiagnosticReports/foo.crash

One bug though: lldb gets confused by tabs in the .crash file (which the OS creates!), you'll need to find/replace tabs->spaces.  (If you file a dupe mention <rdar://15948413>.)

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



 _______________________________________________
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: Finding assembly offset in code
      • From: "Mills, Steve" <email@hidden>
References: 
 >Finding assembly offset in code (From: "Mills, Steve" <email@hidden>)

  • Prev by Date: Re: Finding assembly offset in code
  • Next by Date: Re: Cannot sign in
  • Previous by thread: Re: Finding assembly offset in code
  • Next by thread: Re: Finding assembly offset in code
  • Index(es):
    • Date
    • Thread