diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-11-24 17:10:25 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-11-24 17:14:07 -0500 |
commit | 5f1ca24acd8fd4e21c4f6f3ed2bbc4e2365215fe (patch) | |
tree | d1574417783e201db7d14727e8a635c1808f93a5 /gdb/doc | |
parent | f5291a6f321ba6d657aab447ebb6a168ae48d40b (diff) | |
download | binutils-5f1ca24acd8fd4e21c4f6f3ed2bbc4e2365215fe.zip binutils-5f1ca24acd8fd4e21c4f6f3ed2bbc4e2365215fe.tar.gz binutils-5f1ca24acd8fd4e21c4f6f3ed2bbc4e2365215fe.tar.bz2 |
Fix issues with gdb-memory-map.dtd
While writing a unit test for parse_memory_map, I tried to validate my
test input against gdb-memory-map.dtd, and found a few problems with it.
This doesn't influence how gdb parses it (AFAIK it doesn't use the
linked dtd), but if you edit the xml file in an editor that supports
dtds, you'll get plenty of errors.
- The <memory-map> element accepts exactly one <memory> OR <property>
as a child. This is a problem because you can't have multiple
<memory> elements and you shouldn't be able to have <property> elements
as direct children of <memory-map>.
- The <memory> element wants exactly one <property> child. This is
wrong, since you could have zero or more (even though we only
support one kind of property currently).
- I have no idea wht the device attribute of <memory> is, GDB doesn't
read that. I searched back in time a bit but couldn't find a trace
of it.
I took the opportunity to tighten what is accepted as a value of the
memory type and property name attributes. We currently accept any
string, but we can restrict them to the values GDB really accepts (and
which are documented).
AFAIK, this "file" only exists in the documentation, in gdb.texinfo, so
this is what I modified. However, it's also available at
http://sourceware.org/gdb/gdb-memory-map.dtd. This one should be
updated too, but I don't know how that should be done.
gdb/doc/ChangeLog:
* gdb.texinfo (Memory Map Format): Update gdb-memory-map.dtd.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 62c63f1..79a4025 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2017-11-24 Simon Marchi <simon.marchi@ericsson.com> + + * gdb.texinfo (Memory Map Format): Update gdb-memory-map.dtd. + 2017-11-24 Pedro Alves <palves@redhat.com> * gdb.texinfo (Completion): Update need-quoting examples. Remove diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index afaafc0..f706746 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -40840,18 +40840,17 @@ The formal DTD for memory map format is given below: <!-- .................................... .............. --> <!-- memory-map.dtd --> <!-- memory-map: Root element with versioning --> -<!ELEMENT memory-map (memory | property)> +<!ELEMENT memory-map (memory)*> <!ATTLIST memory-map version CDATA #FIXED "1.0.0"> -<!ELEMENT memory (property)> +<!ELEMENT memory (property)*> <!-- memory: Specifies a memory region, and its type, or device. --> -<!ATTLIST memory type CDATA #REQUIRED +<!ATTLIST memory type (ram|rom|flash) #REQUIRED start CDATA #REQUIRED - length CDATA #REQUIRED - device CDATA #IMPLIED> + length CDATA #REQUIRED> <!-- property: Generic attribute tag --> <!ELEMENT property (#PCDATA | property)*> -<!ATTLIST property name CDATA #REQUIRED> +<!ATTLIST property name (blocksize) #REQUIRED> @end smallexample @node Thread List Format |