Tom de Vries 8439f446a1 [gdb/testsuite] Fix gdb.ada/mi_task_arg.exp for -m32
When running test-case gdb.ada/mi_task_arg.exp with target board unix/-m32, I
run into:
...
(gdb) ^M
Expecting: ^(-stack-list-arguments 1[^M
]+)?(\^done,stack-args=\[ \
  frame={level="0",args=\[\]}, \
  frame={level="1",args=\[{name="<_task>",value="0x[0-9A-Fa-f]+"}\]}, \
  frame={level="2",args=\[({name="self_id",value="0x[0-9A-Fa-f]+"})?\]},.*[^M
]+[(]gdb[)] ^M
[ ]*)
-stack-list-arguments 1^M
^done,stack-args=[ \
  frame={level="0",args=[]}, \
  frame={level="1",args=[{name="<_task>",value="0x808abf0"}]}, \
  frame={level="2",args=[{name="self_id",value="<optimized out>"}]}, \
  frame={level="3",args=[]},frame={level="4",args=[]}]^M
(gdb) ^M
FAIL: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1 (unexpected output)
...

The problem is that we're expecting a $hex for the value of self_id, but
instead get <optimized out>.

Looking at the debug info for self_id:
...
 <1><12a1f>: Abbrev Number: 84 (DW_TAG_subprogram)
    <12a20>   DW_AT_name        : system__tasking__stages__task_wrapper
    ...
 <2><12a35>: Abbrev Number: 61 (DW_TAG_formal_parameter)
    <12a36>   DW_AT_name        : self_id
    <12a40>   DW_AT_location    : 0x459e (location list)
...
it refers to location information here:
...
    0000459e 08053060 080531ac (DW_OP_fbreg: 0)
    000045aa 0805327c 080532a5 (DW_OP_fbreg: 0)
    000045b6 08053320 08053324 (DW_OP_fbreg: 0)
...
while the pc used to retrieve the location information is 0x080531c5:
...
 $ gdb -batch outputs/gdb.ada/mi_task_arg/task_switch \
   -ex "break 57" -ex run -ex bt
   ...
 #0  task_switch.break_me () at task_switch.adb:57
 #1  0x0804aaae in task_switch.caller (<_task>=0x808abf0) \
                     at task_switch.adb:51
 #2  0x080531c5 in system.tasking.stages.task_wrapper \
                     (self_id=<optimized out>) at s-tassta.adb:1295
...
which indeed falls outside of the ranges listed in the location info.

Fix this by accepting <optimized out> as valid value of self_id.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-12-08  Tom de Vries  <tdevries@suse.de>

	* gdb.ada/mi_task_arg.exp: Accept <optimized out> as valid value of
	self_id.
2020-12-08 09:29:40 +01:00
2020-12-08 00:00:18 +00:00
2020-09-08 20:12:57 +09:30
2020-09-25 10:24:44 -04:00
2020-10-05 14:20:15 +01:00
2020-02-20 13:02:24 +10:30
2020-12-02 10:00:27 -05:00
2020-02-07 08:42:25 -07:00

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.
Description
Unofficial mirror of sourceware binutils-gdb repository. Updated daily.
Readme 780 MiB
Languages
C 51.8%
Makefile 22.4%
Assembly 12.3%
C++ 6%
Roff 1.4%
Other 5.4%