Spec-Zone .ru
спецификации, руководства, описания, API
Spec-Zone .ru
спецификации, руководства, описания, API
Библиотека разработчика Mac Разработчик
Поиск

 

Эта страница руководства является частью версии 5.0 Инструментов XCode

Получить эти инструменты:

Если Вы выполняете версию Инструментов XCode кроме 5,0, просматриваете документацию локально:

Читать страницы руководства

Страницы руководства предназначаются как справочник для людей, уже понимающих технологию.

  • Чтобы изучить, как руководство организовано или узнать о синтаксисе команды, прочитайте страницу руководства для страниц справочника (5).

  • Для получения дополнительной информации об этой технологии, ищите другую документацию в Библиотеке Разработчика Apple.

  • Для получения общей информации о записи сценариев оболочки, считайте Shell, Пишущий сценарий Учебника для начинающих.




atos(1)                   BSD General Commands Manual                  atos(1)

NAME
     atos -- convert numeric addresses to symbols of binary images or processes

SYNOPSIS
     atos [-o <binary-image-file>] [-p <pid> | <partial-executable-name>] [-arch architecture]
          [-l <load-address>] [-s <slide>] [-printHeader] [-v] [-D] [-f <address-input-file>]
          [<address> ...]

DESCRIPTION
     The atos command converts numeric addresses to their symbolic equivalents.  If full debug symbol infor-mation information
     mation is available, for example in a .app.dSYM sitting beside a .app, then the output of atos will
     include file name and source line number information.

     The input addresses may be given in one of three ways:

     1.   A list of addresses at the end of the argument list.

     2.   Using the -f <address-input-file> argument to specify the path of an input file containing white-space-separated whitespace-separated
          space-separated numeric addresses.

     3.   If no addresses were directly specified, atos enters an interactive mode, reading addresses from
          stdin.  To exit atos in interactive mode, press ctrl-c.

     The symbols are found in either a binary image file or in a currently executing process, as specified
     by:

     -o <binary-image-file>
             The path to a binary image file in which to look up symbols.

     -p <pid> | <partial-executable-name>
             The process ID or the partial name of a currently executing process in which to look up sym-bols. symbols.
             bols.

     Multiple process IDs or paths can be specified if necessary, and the two can be mixed in any order.
     When working with a Mach-O binary image file, atos considers only addresses and symbols defined in that
     binary image file, at their default locations (unless the -l or -s option is given).  When working with
     a running process, atos considers addresses and symbols defined in all binary images currently loaded
     by that process, at their loaded locations.

     The following additional options are available.

     -arch architecture
             The particular architecure of a binary image file in which to look up symbols.

     -l <load-address>
             The load address of the binary image.  The input addresses are assumed to be in a binary image
             with that load address.  Load addresses for binary images can be found in the Binary Images:
             section at the bottom of crash, sample, leaks, and malloc_history reports.

     -s <slide>
             The slide value of the binary image -- this is the difference between the load address of a
             binary image, and the address at which the binary image was built.  This slide value is sub-tracted subtracted
             tracted from the input addresses.  It is usually easier to directly specify the load address
             with the -l argument than to manually calculate a slide value.

     -v      when atos begins processing a target binary it prints some progress messages. This verbosity is
             disabled by default

     -D      causes atos to print out *every* symbol in every module in the target binary , before doing
             anything else.

     -printHeader
             If a process was specified, the first line of atos output should be a header of the form "Look-ing "Looking
             ing up symbols in process <pid> named:  <process-name>".  This is primarily used when atos is
             invoked as part of a stackshot(1) run, for verification of the process ID and name.

EXAMPLE
     A stripped, optimized version of Sketch was built as an x86_64 position-independent executable (PIE)
     into /BuildProducts/Release.  Full debug symbol information is available in Sketch.app.dSYM, which sits
     alongside Sketch.app.  When Sketch.app was run, the Sketch binary (which was built at 0x100000000) was
     loaded at 0x10acde000.  Running 'sample Sketch' showed 3 addresses that we want to get symbol informa-tion information
     tion for -- 0x10acea1d3, 0x10ace4bea, and 0x10ace4b7a.

     First notice that the .dSYM is next to the .app:

     % ls -1 /BuildProducts/Release/
     Sketch.app
     Sketch.app.dSYM

     Now, to symbolicate, we run atos with the -o flag specifying the path to the actual Sketch executable
     (not the .app wrapper), the -arch x86_64 flag, and the -l _x1_acde___ flag to specify the load address.

     % atos -o /BuildProducts/Release/Sketch.app/Contents/MacOS/Sketch -arch x86_64 -l 0x10acde000  0x10acea1d3 0x10ace4bea 0x10ace4b7a
     -[SKTGraphicView drawRect:] (in Sketch) (SKTGraphicView.m:445)
     -[SKTGraphic drawHandlesInView:] (in Sketch) (NSGeometry.h:110)
     -[SKTGraphic drawHandleInView:atPoint:] (in Sketch) (SKTGraphic.m:490)

GETTING SYMBOLS FOR A DIFFERENT MACHINE ARCHITECTURE
     It is possible to get symbols for addresses from a different machine architecture than the system on
     which atos is running.  For example, when running atos on an Intel-based system, one may wish to get
     the symbol for an address that came from a backtrace of a process running on a PowerPC machine.  To do
     so, use the -arch flag to specify the desired architecture (such as i386 or ppc) and pass in a corre-sponding corresponding
     sponding symbol-rich Mach-O binary image file with a binary image of the corresponding architecture
     (such as a Universal Binary).

BSD                            January 15, 2010                            BSD

Сообщение о проблемах

Способ сообщить о проблеме с этой страницей руководства зависит от типа проблемы:

Ошибки содержания
Ошибки отчета в содержании этой документации со ссылками на отзыв ниже.
Отчеты об ошибках
Сообщите об ошибках в функциональности описанного инструмента или API через Генератор отчетов Ошибки.
Форматирование проблем
Отчет, форматирующий ошибки в интерактивной версии этих страниц со ссылками на отзыв ниже.