binutils-gdb/gdb/testsuite/lib
Yao Qi 3cfe46b618 Match the selftest output when captured_main is inlined
In gdb.gdb/observer.exp, I see the following fail,

(gdb) break captured_main^M
Breakpoint 1 at 0x57e409: file ../../binutils-gdb/gdb/main.c, line 492.^M
(gdb) PASS: gdb.gdb/observer.exp: breakpoint in captured_main
run -nw -nx -data-directory /home/yao.qi/SourceCode/gnu/build/gdb/testsuite/../data-directory^M
Starting program: /home/yao.qi/SourceCode/gnu/build/gdb/testsuite/outputs/gdb.gdb/observer/xgdb -nw -nx -data-directory /home/yao.qi/SourceCode/gnu/build/gdb/testsuite/../data-directory^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".^M
^M
Breakpoint 1, gdb_main (args=args@entry=0x7fffffffdca0) at ../../binutils-gdb/gdb/main.c:1157^M
1157          captured_main (args);^M
(gdb) FAIL: gdb.gdb/observer.exp: run until breakpoint at captured_main

looks the test sets breakpoint on captured_main, and expects program
stops at captured_main.  However, program stops at the place where
captured_main is called, because captured_main is inlined,

 <1><8519e3>: Abbrev Number: 58 (DW_TAG_subprogram)
    <8519e4>   DW_AT_name        : (indirect string, offset: 0x880d3): captured_main
    <8519e8>   DW_AT_decl_file   : 1
    <8519e9>   DW_AT_decl_line   : 444
    <8519eb>   DW_AT_type        : <0x846e48>
    <8519ef>   DW_AT_inline      : 1    (inlined)
    <8519f0>   DW_AT_sibling     : <0x851c01>

The test passes if I build GDB with '-O0 -g3', because captured_main
isn't inlined.  This patch is to match the output when captured_main
is inlined.

gdb/testsuite:

2016-07-12  Yao Qi  <yao.qi@linaro.org>

	* lib/selftest-support.exp (selftest_setup): Match the output
	when captured_main is inlined.
2016-07-12 15:39:34 +01:00
..
ada.exp Remove extra output directory level for Ada tests 2016-07-06 10:03:15 -04:00
append_gdb_boards_dir.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
build-piece.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cache.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cell.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cl_util.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cl_util.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
compiler.c testsuite: Support detection of Intel compilers via test_compiler_version. 2016-04-18 13:52:43 +02:00
compiler.cc testsuite: Support detection of Intel compilers via test_compiler_version. 2016-04-18 13:52:43 +02:00
cp-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
d-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
dtrace.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
dwarf.exp PR symtab/19999 gdb unable to resolve vars with fission+PIE 2016-05-12 09:24:24 -07:00
fortran.exp fortran: Testsuite, fix different type naming across compilers. 2016-04-18 14:04:07 +02:00
future.exp Update gdb test suite for Rust 2016-05-17 12:02:01 -06:00
gdb-guile.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb-python.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb-utils.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb.exp Extend JIT-reader test and fix GDB problems that exposes 2016-07-01 11:56:39 +01:00
gdbserver-support.exp Fix gdbserver/MI testing regression 2016-06-30 11:59:19 +01:00
gen-perf-test.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
go.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
java.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mi-support.exp Make testing gdb with FORCE_SEPARATE_MI_TTY=1 actually work 2016-06-30 11:55:21 +01:00
objc.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
opencl_hostapp.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
opencl_kernel.cl
opencl.exp testsuite: Fix some tests that write outside of the standard output directory 2016-02-15 11:46:10 -05:00
pascal.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
pdtrace.in GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
perftest.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
prelink-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
prompt.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
range-stepping-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
read1.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
rust-support.exp Update gdb test suite for Rust 2016-05-17 12:02:01 -06:00
selftest-support.exp Match the selftest output when captured_main is inlined 2016-07-12 15:39:34 +01:00
set_unbuffered_mode.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-support.exp gdbserver/s390: Switch on tracepoint support. 2016-03-29 23:08:05 +02:00
unbuffer_output.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00