(Files): Document the possibility of loading unlinked object files.
authorEli Zaretskii <eliz@gnu.org>
Sat, 18 Jun 2005 12:36:06 +0000 (12:36 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 18 Jun 2005 12:36:06 +0000 (12:36 +0000)
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index 73b650e0fab6f63322a31c647280057450cf8cf8..59127d9aa7394fa0ade32ef47e392076648c5d92 100644 (file)
@@ -6,6 +6,8 @@
        (Output Formats): More detailed description of the `c' format.
        (Memory): List explicitly all the formats supported by `x'.
        (Threads): Add an @cindex entry for "thread apply".
+       (Files): Document the possibility of loading unlinked object
+       files.
 
 2005-06-18  Nick Roberts  <nickrob@snap.net.nz>
 
index 7359108644442b8cee67c2a914d422c6bc22a90c..adb4ebb6787bcf1028f02ca3b89d71b3823877d0 100644 (file)
@@ -10651,6 +10651,17 @@ descriptions of the file options @samp{-mapped} and @samp{-readnow}
 and with the commands @code{file}, @code{symbol-file}, or
 @code{add-symbol-file}, described below), for more information.
 
+@cindex unlinked object files
+@cindex patching object files
+You can load unlinked object @file{.o} files into @value{GDBN} using
+the @code{file} command.  You will not be able to ``run'' an object
+file, but you can disassemble functions and inspect variables.  Also,
+if the underlying BFD functionality supports it, you could use
+@kbd{gdb -write} to patch object files using this technique.  Note
+that @value{GDBN} can neither interpret nor modify relocations in this
+case, so branches and some initialized variables will appear to go to
+the wrong place.  But this feature is still handy from time to time.
+
 @item file
 @code{file} with no argument makes @value{GDBN} discard any information it
 has on both executable file and the symbol table.
This page took 0.050901 seconds and 4 git commands to generate.