[Lldb-commits] [lldb] r171542 - /lldb/trunk/www/symbolication.html

Jason Molenda jmolenda at apple.com
Fri Jan 4 14:37:21 PST 2013


Author: jmolenda
Date: Fri Jan  4 16:37:21 2013
New Revision: 171542

URL: http://llvm.org/viewvc/llvm-project?rev=171542&view=rev
Log:
A few small tweaks to the symbolication page.

Modified:
    lldb/trunk/www/symbolication.html

Modified: lldb/trunk/www/symbolication.html
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/symbolication.html?rev=171542&r1=171541&r2=171542&view=diff
==============================================================================
--- lldb/trunk/www/symbolication.html (original)
+++ lldb/trunk/www/symbolication.html Fri Jan  4 16:37:21 2013
@@ -27,14 +27,14 @@
 							</p>
 								<ul>
 									<li>Inlined functions</li>
-									<li>Variables that are in scope for an address along with their locations</li>
+									<li>Variables that are in scope for an address, along with their locations</li>
 								</ul>
-							<p>The simplest form of symbolication is to just load an executable:</p>
+							<p>The simplest form of symbolication is to load an executable:</p>
 <code><pre><tt><b>(lldb)</b> target create --no-dependents --arch x86_64 /tmp/a.out
 </tt></pre></code>
 							<p>We use the "--no-dependents" flag with the "target create" command so
 								that we don't load all of the dependent shared libraries from the current
-								OS. When we symbolicate, we are often symbolicating a binary that
+								system. When we symbolicate, we are often symbolicating a binary that
 								was running on another system, and even though the main executable might
 								reference shared libraries in "/usr/lib", we often don't want to load
 								the versions on the current computer.</p>
@@ -47,7 +47,7 @@
       /tmp/a.out.dSYM/Contents/Resources/DWARF/a.out
 </tt></pre></code>
 
-							<p>Now we can lookup an address:</p>
+							<p>Now we can look up an address:</p>
 <code><pre><tt><b>(lldb)</b> image lookup --address 0x100000aa3
       Address: a.out[0x0000000100000aa3] (a.out.__TEXT.__text + 131)
       Summary: a.out`main + 67 at main.c:13
@@ -95,22 +95,24 @@
     			<h1 class="postheader">Defining Load Addresses for Sections</h1>
     			<div class="postcontent">
     			    <p>When symbolicating your crash logs, it can be tedious if you always have to
-								fixup your addresses into file specified addresses. To avoid having to do any
+								adjust your crashlog-addresses into file addresses. To avoid having to do any
 								conversion, you can set the load address for the sections of the modules in your target. 
-								Once you set any section load address locations, lookups will switch to using
+								Once you set any section load address, lookups will switch to using
 								<b>load</b> addresses. You can slide all sections in the executable by the same amount,
-								or set the <b>load</b> address if individual sections. The
-								"target moodules load" command allows us to set the <b>load</b> address for
-								the sections.
+								or set the <b>load</b> address for individual sections. The
+								"target modules load --slide" command allows us to set the <b>load</b> address for
+								all sections.
 							<p>Below is an example of sliding all sections in <b>a.out</b> by adding 0x123000 to each section's <b>file</b> address:</p>
 <code><pre><tt><b>(lldb)</b> target create --no-dependents --arch x86_64 /tmp/a.out
 <b>(lldb)</b> target modules load --file a.out --slide 0x123000
 </tt></pre></code>
-							<p>It is often much easier to just specify the actual load location of each section by name. 
-								Crash logs on MacOSX actuall have a <b>Binary Images</b> section that specifies
-								that address of the __TEXT segments for each binary. Computing the slide can be tricky
-								for executables and you need to be careful to calculate the slide correctly. If you specify the
-								address of the __TEXT segment, you don't need to do any calculations. To specify
+							<p>It is often much easier to specify the actual load location of each section by name. 
+								Crash logs on Mac OS X have a <b>Binary Images</b> section that specifies
+								that address of the __TEXT segment for each binary. Specifying a slide requires
+                                                                requires that you first find the original (<b>file</b>) address for the __TEXT
+                                                                segment, and subtract the two values.
+								If you specify the
+								address of the __TEXT segment with "target modules load <i>section</i> <i>address</i>", you don't need to do any calculations. To specify
 								the load addresses of sections we can specify one or more section name + address pairs
 								in the "target modules load" command:</p>
 <code><pre><tt><b>(lldb)</b> target create --no-dependents --arch x86_64 /tmp/a.out
@@ -119,7 +121,7 @@
 							<p>We specified that the <b>__TEXT</b> section is loaded at 0x100123000.
 								Now that we have defined where sections have been loaded in our target, 
 								any lookups we do will now use <b>load</b> addresses so we don't have to
-								do any math on the addresses in the stack backtraces, we can just use the
+								do any math on the addresses in the crashlog backtraces, we can just use the
 								raw addresses:</p>
 <code><pre><tt><b>(lldb)</b> image lookup --address 0x100123aa3
       Address: a.out[0x0000000100000aa3] (a.out.__TEXT.__text + 131)
@@ -149,13 +151,13 @@
 <b>(lldb)</b> target modules add /usr/lib/system/libsystem_dnssd.dylib
 <b>(lldb)</b> target modules add /usr/lib/system/libsystem_kernel.dylib
 </tt></pre></code>
-							<p>If you have debug symbols in stand alone files, such as dSYM files on MacOSX, you can specify their paths using the <b>--symfile</b> option for the "target create" (recent LLDB releases only) and "target modules add" commands:</p>
+							<p>If you have debug symbols in standalone files, such as dSYM files on Mac OS X, you can specify their paths using the <b>--symfile</b> option for the "target create" (recent LLDB releases only) and "target modules add" commands:</p>
 <code><pre><tt><b>(lldb)</b> target create --no-dependents --arch x86_64 /tmp/a.out <b>--symfile /tmp/a.out.dSYM</b>
 <b>(lldb)</b> target modules add /usr/lib/system/libsystem_c.dylib <b>--symfile /build/server/a/libsystem_c.dylib.dSYM</b>
 <b>(lldb)</b> target modules add /usr/lib/system/libsystem_dnssd.dylib <b>--symfile /build/server/b/libsystem_dnssd.dylib.dSYM</b>
 <b>(lldb)</b> target modules add /usr/lib/system/libsystem_kernel.dylib <b>--symfile /build/server/c/libsystem_kernel.dylib.dSYM</b>
 </tt></pre></code>
-							<p>Then we set the load addresses for each __TEXT section using (note the colors of the load addresses above and below) the first address from the Binary Images section for each image:</p>
+							<p>Then we set the load addresses for each __TEXT section (note the colors of the load addresses above and below) using the first address from the Binary Images section for each image:</p>
 <code><pre><tt><b>(lldb)</b> target modules load --file a.out <font color=blue>0x100000000</font>
 <b>(lldb)</b> target modules load --file libsystem_c.dylib <font color=green>0x7fff83f32000</font>
 <b>(lldb)</b> target modules load --file libsystem_dnssd.dylib <font color=red>0x7fff883db000</font>
@@ -289,20 +291,20 @@
 									instances that need to be loaded in order to symbolicate an supplied address.
 								</p>
 							<h2>lldb.macosx.crashlog</h2>
-							<p><b>lldb.macosx.crashlog</b> is a package that is distributed on MacOSX builds that subclasses the above classes.
-								This module parses the information in the Darwin crash logs and creates symbolcation objects that
+							<p><b>lldb.macosx.crashlog</b> is a package that is distributed on Mac OS X builds that subclasses the above classes.
+								This module parses the information in the Darwin crash logs and creates symbolication objects that
 								represent the images, the sections and the thread frames for the backtraces. It then uses the functions
 								in the lldb.utils.symbolication to symbolicate the crash logs.</p>
 							<p>
 								This module installs a new "crashlog" command into the lldb command interpreter so that you can use
-								it to parse and symbolicate MacOSX crash logs:</p>
+								it to parse and symbolicate Mac OS X crash logs:</p>
 <code><pre><tt><b>(lldb)</b> script import lldb.macosx.crashlog
 "crashlog" and "save_crashlog" command installed, use the "--help" option for detailed help
 <b>(lldb)</b> crashlog /tmp/crash.log
 ...
 </tt></pre></code>
-							<p>The command that is installed has built in help that shows the variety of
-								different options that can be used when symbolicating:
+							<p>The command that is installed has built in help that shows the 
+								options that can be used when symbolicating:
 <code><pre><tt><b>(lldb)</b> crashlog --help
 Usage: crashlog [options] <FILE> [FILE ...]
 





More information about the lldb-commits mailing list