GNU Binutils with patches for OS216
リビジョン | 37554d1e7bf15b8c0df23d9986799d17deaa3bd6 (tree) |
---|---|
日時 | 2006-03-30 07:59:04 |
作者 | Jim Blandy <jimb@code...> |
コミッター | Jim Blandy |
Update based on Eli Zaretskii's suggestions:
- Fix reference to qPart packet description.
- Fix spacing in itemized lists and around examples in info.
- Rephrase explanation of how multi-annex descriptions are retrieved.
- Provide more detail on "SHA-1".
@@ -23252,7 +23252,7 @@ Reply: see @code{remote.c:remote_unpack_thread_info_response()}. | ||
23252 | 23252 | @item qPart:@var{object}:read:@var{annex}:@var{offset},@var{length} |
23253 | 23253 | @cindex read special object, remote request |
23254 | 23254 | @cindex @samp{qPart} packet |
23255 | -@anchor{qPart request} | |
23255 | +@anchor{the qPart request} | |
23256 | 23256 | Read uninterpreted bytes from the target's special data area |
23257 | 23257 | identified by the keyword @var{object}. Request @var{length} bytes |
23258 | 23258 | starting at @var{offset} bytes into the data. The content and |
@@ -24830,21 +24830,17 @@ architectures have hundreds of variants, available from dozens of | ||
24830 | 24830 | vendors. This leads to a number of problems: |
24831 | 24831 | |
24832 | 24832 | @itemize @bullet |
24833 | - | |
24834 | 24833 | @item |
24835 | 24834 | With so many different customized processors, it is difficult for |
24836 | 24835 | the @value{GDBN} maintainers to keep up with the changes. |
24837 | - | |
24838 | 24836 | @item |
24839 | 24837 | Since individual variants may have short lifetimes or limited |
24840 | 24838 | audiences, it may not be worthwhile to carry information about every |
24841 | 24839 | variant in the @value{GDBN} source tree. |
24842 | - | |
24843 | 24840 | @item |
24844 | 24841 | When @value{GDBN} does support the architecture of the embedded system |
24845 | 24842 | at hand, the task of finding the correct architecture name to give the |
24846 | 24843 | @command{set architecture} command can be error-prone. |
24847 | - | |
24848 | 24844 | @end itemize |
24849 | 24845 | |
24850 | 24846 | To address these problems, the @value{GDBN} remote protocol allows a |
@@ -24853,47 +24849,49 @@ actually describe its own features. This lets @value{GDBN} support | ||
24853 | 24849 | processor variants it has never seen before --- to the extent that the |
24854 | 24850 | descriptions are accurate, and that @value{GDBN} understands them. |
24855 | 24851 | |
24856 | - | |
24857 | 24852 | @menu |
24858 | -* Retrieving Self-Descriptions:: How descriptions are fetched from a | |
24859 | - target. | |
24853 | +* Retrieving Self-Descriptions:: How descriptions are fetched from a target. | |
24860 | 24854 | * Self-Description Format:: The contents of a self-description. |
24861 | 24855 | @end menu |
24862 | 24856 | |
24863 | 24857 | @node Retrieving Self-Descriptions |
24864 | 24858 | @section Retrieving Self-Descriptions |
24865 | 24859 | |
24866 | -@value{GDBN} retrieves a target's self-description via the remote | |
24867 | -protocol using a @code{qPart} request (@pxref{qPart request,, the | |
24868 | -@code{qPart} request}) of the form: | |
24860 | +A target can split its self-description into one or more pieces, | |
24861 | +called @dfn{annexes}. @value{GDBN} retrieves each annex via the | |
24862 | +remote protocol using @code{qPart} requests (@pxref{the qPart | |
24863 | +request}) of the form: | |
24864 | + | |
24869 | 24865 | @example |
24870 | 24866 | qPart:features:read:@var{annex}:@var{offset},@var{length} |
24871 | 24867 | @end example |
24868 | + | |
24872 | 24869 | @noindent |
24873 | -where @var{annex} is the string @samp{target.xml}. The @var{offset} | |
24874 | -and @var{length} parameters are the offset into the description and | |
24875 | -the number of bytes to transfer, as for other @code{qPart} requests. | |
24876 | - | |
24877 | -The @samp{target.xml} annex contains an XML document describing the | |
24878 | -target's features; its form is described in @ref{Self-Description | |
24879 | -Format}. | |
24880 | - | |
24881 | -Feature descriptions may be split into several annexes, which | |
24882 | -@value{GDBN} retrieves and assembles into a complete description. An | |
24883 | -annex may use @uref{http://www.w3.org/TR/xinclude/, XML Inclusions} to | |
24884 | -incorporate other annexes, much as a C header file refers to other | |
24885 | -headers using @code{#include}. @value{GDBN} first retrieves | |
24886 | -@samp{target.xml}, and then makes further @code{qPart} requests as | |
24887 | -needed to retrieve the annexes referred to by any @code{xi:include} | |
24888 | -elements it finds. Naturally, annexes brought in by @code{xi:include} | |
24889 | -may use @code{xi:include} themselves. | |
24870 | +where @var{annex} is the name of the annex, and the @var{offset} and | |
24871 | +@var{length} parameters are the offset into the description and the | |
24872 | +number of bytes to transfer, as for other @code{qPart} requests. | |
24873 | + | |
24874 | +To retrieve a target's self-description, @value{GDBN} first fetches | |
24875 | +the annex named @samp{target.xml}. This is an XML document, of the | |
24876 | +form described in @ref{Self-Description Format}. Just as C header | |
24877 | +files can refer to other header files using @code{#include}, target | |
24878 | +description annexes can use @uref{http://www.w3.org/TR/xinclude/, XML | |
24879 | +Inclusions} to incorporate other annexes. Starting with | |
24880 | +@samp{target.xml}, @value{GDBN} makes further @code{qPart} requests as | |
24881 | +needed to resolve all the inclusions and assemble the complete | |
24882 | +description. | |
24890 | 24883 | |
24891 | 24884 | To reduce protocol overhead, a target may supply a special annex named |
24892 | -@samp{CHECKSUMS} that provides 160-bit SHA1 checksum values for the | |
24893 | -annexes it has available. The @samp{CHECKSUMS} annex contains a | |
24894 | -series of newline-terminated lines, each of which contains a 40-digit | |
24895 | -hexidecimal checksum, two spaces, and the name of an annex with the | |
24896 | -given checksum. Here is an example @samp{CHECKSUM} annex: | |
24885 | +@samp{CHECKSUMS} that provides 160-bit SHA-1@footnote{The SHA-1 hash | |
24886 | +function is defined in | |
24887 | +@uref{http://www.itl.nist.gov/fipspubs/fip180-1.htm, Federal | |
24888 | +Information Processing Standards Publication 180-1}. The GNU | |
24889 | +coreutils contain a Free implementation of SHA-1.} checksum values | |
24890 | +for the annexes it has available. The @samp{CHECKSUMS} annex contains | |
24891 | +a series of newline-terminated lines, each of which contains a | |
24892 | +40-digit hexidecimal checksum, two spaces, and the name of an annex | |
24893 | +with the given checksum. Here is an example @samp{CHECKSUMS} annex: | |
24894 | + | |
24897 | 24895 | @example |
24898 | 24896 | 68c94ffc34f8ad2d7bfae3f5a6b996409211c1b1 target.xml |
24899 | 24897 | 0e8e850b0580fbaaa0872326cb1b8ad6adda9b0d mmu.xml |
@@ -24935,6 +24933,7 @@ be accessed via the remote protocol @code{g}, @code{G}, @code{p} and | ||
24935 | 24933 | kinds of information, like memory maps. |
24936 | 24934 | |
24937 | 24935 | Here is a simple sample target description: |
24936 | + | |
24938 | 24937 | @example |
24939 | 24938 | <?xml version="1.0"?> |
24940 | 24939 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> |
@@ -24949,11 +24948,14 @@ Here is a simple sample target description: | ||
24949 | 24948 | </feature-set> |
24950 | 24949 | </target> |
24951 | 24950 | @end example |
24951 | + | |
24952 | +@noindent | |
24952 | 24953 | This describes a simple target feature set which only contains two |
24953 | 24954 | registers, named @code{s0} (a 32-bit integer register) and @code{s1} |
24954 | 24955 | (a 32-bit floating point register). |
24955 | 24956 | |
24956 | 24957 | A target description has the overall form: |
24958 | + | |
24957 | 24959 | @example |
24958 | 24960 | <?xml version="1.0"?> |
24959 | 24961 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> |
@@ -24962,6 +24964,7 @@ A target description has the overall form: | ||
24962 | 24964 | @var{feature-set} |
24963 | 24965 | </target> |
24964 | 24966 | @end example |
24967 | + | |
24965 | 24968 | @noindent |
24966 | 24969 | The description is generally insensitive to whitespace and line |
24967 | 24970 | breaks, under the usual common-sense rules. The ellipsis |
@@ -24972,16 +24975,19 @@ Each @var{feature} names and describes a single feature of the target; | ||
24972 | 24975 | at the moment, features can only describe register sets. The |
24973 | 24976 | @var{feature-set} cites particular features by name, pulling together |
24974 | 24977 | a complete description of the target. A @var{feature} has the form: |
24978 | + | |
24975 | 24979 | @example |
24976 | 24980 | <feature name="@var{name}"> |
24977 | 24981 | @var{reg}@dots{} |
24978 | 24982 | </feature> |
24979 | 24983 | @end example |
24984 | + | |
24980 | 24985 | @noindent |
24981 | 24986 | This defines a feature named @var{name}; each feature's name must be |
24982 | 24987 | unique across the description. |
24983 | 24988 | |
24984 | 24989 | Each @var{reg} has the form: |
24990 | + | |
24985 | 24991 | @example |
24986 | 24992 | <reg name="@var{name}" |
24987 | 24993 | bitsize="@var{size}" |
@@ -24991,6 +24997,7 @@ Each @var{reg} has the form: | ||
24991 | 24997 | @r{[}type="@var{type}"@r{]} |
24992 | 24998 | @r{[}group="@var{group}"@r{]}/> |
24993 | 24999 | @end example |
25000 | + | |
24994 | 25001 | @noindent |
24995 | 25002 | Items in @r{[}brackets@r{]} are optional. The components are as follows: |
24996 | 25003 |
@@ -25033,16 +25040,21 @@ select a register group based on the register's type. | ||
25033 | 25040 | A @var{feature-set} binds together a set of features to describe |
25034 | 25041 | a complete target. There can be only one @var{feature-set} in a |
25035 | 25042 | target. Each @var{feature-set} has the form: |
25043 | + | |
25036 | 25044 | @example |
25037 | 25045 | <feature-set> |
25038 | 25046 | @var{feature-ref}@dots{} |
25039 | 25047 | </feature-set> |
25040 | 25048 | @end example |
25049 | + | |
25041 | 25050 | @noindent |
25042 | 25051 | where each @var{feature-ref} has the form: |
25052 | + | |
25043 | 25053 | @example |
25044 | 25054 | <feature-ref name="@var{name}" @r{[}base-regnum="@var{n}"@r{]}/> |
25045 | 25055 | @end example |
25056 | + | |
25057 | +@noindent | |
25046 | 25058 | This means that the target includes the feature named @var{name}. If |
25047 | 25059 | the @code{base-regnum} is present, that means that registers in the |
25048 | 25060 | given feature are numbered starting with @var{n}, until overridden by |
@@ -25053,9 +25065,12 @@ several different annexes, either for organizational purposes, or to | ||
25053 | 25065 | allow @value{GDBN} to cache portions of the description that change |
25054 | 25066 | rarely. To make this possible, you can replace any feature |
25055 | 25067 | description with an inclusion directive of the form: |
25068 | + | |
25056 | 25069 | @example |
25057 | 25070 | <xi:include href="@var{annex}"/> |
25058 | 25071 | @end example |
25072 | + | |
25073 | +@noindent | |
25059 | 25074 | When @value{GDBN} encounters an element of this form, it will retrieve |
25060 | 25075 | the annex named @var{annex} (or use its cached copy), and replace the |
25061 | 25076 | inclusion directive with the contents of that annex. |