diff options
author | Maciej W. Rozycki <macro@mips.com> | 2014-07-15 22:54:05 +1000 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2014-07-15 22:54:05 +1000 |
commit | f53d3dc51d10229a40df1fc85dd330a0fbc12727 (patch) | |
tree | d2d2ccd5bc30c1e14cd953ae3c680b284fb43fd9 | |
parent | f4d01a7e996969d10fc263aa8dc82644cd149f3a (diff) | |
download | dejagnu-f53d3dc51d10229a40df1fc85dd330a0fbc12727.zip dejagnu-f53d3dc51d10229a40df1fc85dd330a0fbc12727.tar.gz dejagnu-f53d3dc51d10229a40df1fc85dd330a0fbc12727.tar.bz2 |
* lib/targetdb.exp (add_board_info): New procedure.
* doc/ref.xml (Add_board_info Procedure): New section.
(Set_board_info Procedure): Add description.
(Unset_board_info Procedure): Likewise.
* doc/user.xml (Board Config File Values): Add `add_board_info'
reference. Reorder `gdb_init_command' table rows and remove a
duplicate entry, reusing it for `gdb_init_commands'.
Signed-off-by: Ben Elliston <bje@gnu.org>
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | doc/dejagnu.texi | 56 | ||||
-rw-r--r-- | doc/ref.xml | 43 | ||||
-rw-r--r-- | doc/user.xml | 23 | ||||
-rw-r--r-- | lib/targetdb.exp | 9 |
5 files changed, 119 insertions, 23 deletions
@@ -1,3 +1,14 @@ +2014-07-15 Maciej W. Rozycki <macro@mips.com> + Maciej W. Rozycki <macro@codesourcery.com> + + * lib/targetdb.exp (add_board_info): New procedure. + * doc/ref.xml (Add_board_info Procedure): New section. + (Set_board_info Procedure): Add description. + (Unset_board_info Procedure): Likewise. + * doc/user.xml (Board Config File Values): Add `add_board_info' + reference. Reorder `gdb_init_command' table rows and remove a + duplicate entry, reusing it for `gdb_init_commands'. + 2014-06-06 Ben Elliston <bje@gnu.org> * depcomp, install-sh, missing: Update to latest versions. diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index bd82d44..fc788d5 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -2871,10 +2871,11 @@ procedures are the ones in square braces @node Board File Values, Writing A Test Case, Adding A New Board, Extending DejaGnu @section Board Config File Values -These fields are all in the @code{board_info} These are -all set by using the @code{set_board_info} procedure. The -parameters are the field name, followed by the value to set the field -to. +These fields are all in the @code{board_info} array. +These are all set by using the @code{set_board_info} +and @code{add_board_info} procedures as required. The +parameters are the field name, followed by the value that the field +is set to or is added to the field, respectively. @strong{Common Board Info Fields} @@ -2937,8 +2938,6 @@ gdb_sect_offset@tab "0x41000000";@tab @item gdb_stub_ldscript@tab "-Wl,-Teva-stub.ld"@tab The linker script to use with a GDB stub. @item -gdb_init_command@tab "set mipsfpu none"@tab -@item gdb,cannot_call_functions@tab 1@tab Whether GDB can call functions on the target, @item gdb,noargs@tab 1@tab Whether the target can take command line arguments. @@ -2953,7 +2952,11 @@ gdb,target_sim_options@tab "-sparclite"@tab Special options to pass to the simul @item gdb,timeout@tab 540@tab Timeout value to use for remote communication. @item -gdb_init_command@tab "print/x \$fsr = 0x0"@tab +gdb_init_command@tab "set mipsfpu none"@tab A single command to send to GDB before the program being +debugged is started. +@item +gdb_init_commands@tab "print/x \$fsr = 0x0"@tab Same as @emph{gdb_init_command}, except +that this is a list, more commands can be added. @item gdb_load_offset@tab "0x12020000"@tab @item @@ -5828,6 +5831,7 @@ download. * Board_info Procedure: board_info procedure. * Host_info Procedure: host_info procedure. * Set_board_info Procedure: set_board_info procedure. +* Add_board_info Procedure: add_board_info procedure. * Set_currtarget_info Procedure: set_currtarget_info procedure. * Target_info Procedure: target_info procedure. * Unset_board_info Procedure: unset_board_info procedure. @@ -5880,9 +5884,12 @@ download. @item @code{args} @end table -@node set_board_info procedure, set_currtarget_info procedure, host_info procedure, target database library file +@node set_board_info procedure, add_board_info procedure, host_info procedure, target database library file @subsubsection Set_board_info Procedure +This checks if @code{board_info} array's field +@emph{entry} has been set already and if not, then +sets it to @emph{value}. @quotation @@ -5893,11 +5900,37 @@ download. @table @asis @item @code{entry} +The name of a @code{board_info} field +to operate on. @item @code{value} +The value to set the field to. @end table -@node set_currtarget_info procedure, target_info procedure, set_board_info procedure, target database library file +@node add_board_info procedure, set_currtarget_info procedure, set_board_info procedure, target database library file +@subsubsection Add_board_info Procedure + +This treats @code{board_info} array's field +@emph{entry} as a TCL list and adds +@emph{value} at the end. + +@quotation + +@t{@b{add_board_info}(@i{entry} +@i{value});} +@end quotation + +@table @asis + +@item @code{entry} +The name of a @code{board_info} field +to operate on. + +@item @code{value} +The value to add to the field. +@end table + +@node set_currtarget_info procedure, target_info procedure, add_board_info procedure, target database library file @subsubsection Set_currtarget_info Procedure @@ -5934,6 +5967,9 @@ download. @node unset_board_info procedure, unset_currtarget_info procedure, target_info procedure, target database library file @subsubsection Unset_board_info Procedure +This checks if @code{board_info} array's field +@emph{entry} has been set and if so, then removes +it. @quotation @@ -5943,6 +5979,8 @@ download. @table @asis @item @code{entry} +The name of a @code{board_info} field +to operate on. @end table @node unset_currtarget_info procedure, push_target procedure, unset_board_info procedure, target database library file diff --git a/doc/ref.xml b/doc/ref.xml index 0c0f1f6..9389398 100644 --- a/doc/ref.xml +++ b/doc/ref.xml @@ -3104,7 +3104,9 @@ <sect4 id="setboardinfo" xreflabel="set_board_info procedure"> <title>Set_board_info Procedure</title> - <para></para> + <para>This checks if <symbol>board_info</symbol> array's field + <emphasis>entry</emphasis> has been set already and if not, then + sets it to <emphasis>value</emphasis>.</para> <funcsynopsis role="tcl"> <funcprototype> @@ -3116,15 +3118,43 @@ <variablelist> <varlistentry> <term><parameter>entry</parameter></term> - <listitem><para></para></listitem> + <listitem><para>The name of a <symbol>board_info</symbol> field + to operate on.</para></listitem> </varlistentry> <varlistentry> <term><parameter>value</parameter></term> - <listitem><para></para></listitem> + <listitem><para>The value to set the field to.</para></listitem> </varlistentry> </variablelist> </sect4> + <sect4 id="addboardinfo" xreflabel="add_board_info procedure"> + <title>Add_board_info Procedure</title> + + <para>This treats <symbol>board_info</symbol> array's field + <emphasis>entry</emphasis> as a TCL list and adds + <emphasis>value</emphasis> at the end.</para> + + <funcsynopsis role="tcl"> + <funcprototype> + <funcdef><function>add_board_info</function></funcdef> + <paramdef><parameter>entry</parameter> + <parameter>value</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <variablelist> + <varlistentry> + <term><parameter>entry</parameter></term> + <listitem><para>The name of a <symbol>board_info</symbol> field + to operate on.</para></listitem> + </varlistentry> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem><para>The value to add to the field.</para></listitem> + </varlistentry> + </variablelist> + </sect4> + <sect4 id="setcurrtargetinfo" xreflabel="set_currtarget_info procedure"> <title>Set_currtarget_info Procedure</title> @@ -3177,7 +3207,9 @@ <sect4 id="unsetboardinfo" xreflabel="unset_board_info procedure"> <title>Unset_board_info Procedure</title> - <para></para> + <para>This checks if <symbol>board_info</symbol> array's field + <emphasis>entry</emphasis> has been set and if so, then removes + it.</para> <funcsynopsis role="tcl"> <funcprototype> @@ -3188,7 +3220,8 @@ <variablelist> <varlistentry> <term><parameter>entry</parameter></term> - <listitem><para></para></listitem> + <listitem><para>The name of a <symbol>board_info</symbol> field + to operate on.</para></listitem> </varlistentry> </variablelist> </sect4> diff --git a/doc/user.xml b/doc/user.xml index 9a2baf4..f7e55c0 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -2505,10 +2505,11 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect2 id="boarddefs" xreflabel="Board File Values"> <title>Board Config File Values</title> - <para>These fields are all in the <symbol>board_info</symbol> These are - all set by using the <function>set_board_info</function> procedure. The - parameters are the field name, followed by the value to set the field - to.</para> + <para>These fields are all in the <symbol>board_info</symbol> array. + These are all set by using the <function>set_board_info</function> + and <function>add_board_info</function> procedures as required. The + parameters are the field name, followed by the value that the field + is set to or is added to the field, respectively.</para> <table frame="all" rowsep="0" colsep="0"> <title>Common Board Info Fields</title> @@ -2667,11 +2668,6 @@ powerpc-linux-gcc -g -O2 -o calc calc.o </row> <row> - <entry>gdb_init_command</entry> - <entry>"set mipsfpu none"</entry> - </row> - - <row> <entry>gdb,cannot_call_functions</entry> <entry>1</entry> <entry>Whether GDB can call functions on the target,</entry> @@ -2714,7 +2710,16 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <row> <entry>gdb_init_command</entry> + <entry>"set mipsfpu none"</entry> + <entry>A single command to send to GDB before the program being + debugged is started.</entry> + </row> + + <row> + <entry>gdb_init_commands</entry> <entry>"print/x \$fsr = 0x0"</entry> + <entry>Same as <emphasis>gdb_init_command</emphasis>, except + that this is a list, more commands can be added.</entry> </row> <row> diff --git a/lib/targetdb.exp b/lib/targetdb.exp index da5c40f..6e4ec3c 100644 --- a/lib/targetdb.exp +++ b/lib/targetdb.exp @@ -73,6 +73,15 @@ proc set_board_info { entry value } { } } +# +# Add VALUE to ENTRY for the current board being defined. +# +proc add_board_info { entry value } { + global board_info board + + lappend board_info($board,$entry) $value +} + # Fill in ENTRY with VALUE for the current target. # proc set_currtarget_info { entry value } { |