This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/testsuite] gdb.mi/mi-pthreads.exp, gdb.mi/mi1-pthreads.exp: work with stripped libc
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Michael Elizabeth Chastain <mec at shout dot net>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 6 Jan 2003 12:37:01 -0500
- Subject: Re: [rfa/testsuite] gdb.mi/mi-pthreads.exp, gdb.mi/mi1-pthreads.exp: work with stripped libc
- References: <200301040544.h045iuR26735@duracef.shout.net>
Michael Elizabeth Chastain writes:
> This patch fixes several FAILs in gdb.mi/pthreads.exp and gdb.mi/pthreads.exp.
> Reference:
>
> http://sources.redhat.com/ml/gdb/2003-01/msg00001.html
> http://sources.redhat.com/ml/gdb/2003-01/msg00012.html
> http://sources.redhat.com/ml/gdb/2003-01/msg00020.html
>
> The FAILS are:
>
> gdb.mi/mi-pthreads.exp: check_mi_thread_command_set: -thread-select 2
> gdb.mi/mi-pthreads.exp: check_mi_thread_command_set: -thread-select 3
> gdb.mi/mi-pthreads.exp: check_mi_thread_command_set: -thread-select 4
> gdb.mi/mi-pthreads.exp: check_mi_thread_command_set: -thread-select 5
> gdb.mi/mi-pthreads.exp: check_mi_thread_command_set: -thread-select 6
> gdb.mi/mi-pthreads.exp: check_mi_thread_command_set: -thread-select 7
> gdb.mi/mi1-pthreads.exp: check_mi_thread_command_set: -thread-select 2
> gdb.mi/mi1-pthreads.exp: check_mi_thread_command_set: -thread-select 3
> gdb.mi/mi1-pthreads.exp: check_mi_thread_command_set: -thread-select 4
> gdb.mi/mi1-pthreads.exp: check_mi_thread_command_set: -thread-select 5
> gdb.mi/mi1-pthreads.exp: check_mi_thread_command_set: -thread-select 6
> gdb.mi/mi1-pthreads.exp: check_mi_thread_command_set: -thread-select 7
>
> The test script selects a new thread and checks the output from gdb.
> The test expects to see attributes of 'new-thread-id', 'frame',
> 'line', and 'file'.
>
> Many of the threads are blocked in libc calls, and many people, such as
> me, have libc's with no symbols. So I'm not getting 'line' and 'file'.
> I suspect that other people have home-built libc's or glibc's with
> symbols in them and that's why these tests would pass for them.
>
> This patch makes 'line' and 'file' optional. 'new-thread-id' and 'frame'
> are still mandatory to PASS.
>
> Testing: my usual testbed:
>
> target = native, host = i686-pc-linux-gnu, osversion = red-hat-8.0,
> gdb = HEAD%20021231, gcc => several v2 and v3, binutils => several,
> libc = vendor, gformat => dwarf-2, stabs+
>
> With this patch, all tests in these two scripts PASS.
>
> OK to commit?
yes
Elena
>
> Michael C
>
> ===
>
> 2003-01-03 Michael Chastain <mec@shout.net>
>
> * gdb.mi/mi-pthreads.exp (check_mi_thread_command_set):
> When selecting a thread, 'line' and 'file' are optional.
> * gdb.mi/mi1-pthreads.exp: Likewise.
>
> ===
>
> Index: mi-pthreads.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-pthreads.exp,v
> retrieving revision 1.3
> diff -u -r1.3 mi-pthreads.exp
> --- mi-pthreads.exp 25 Sep 2002 16:08:43 -0000 1.3
> +++ mi-pthreads.exp 4 Jan 2003 05:26:19 -0000
> @@ -1,4 +1,4 @@
> -# Copyright 2002 Free Software Foundation, Inc.
> +# Copyright 2002, 2003 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -191,8 +191,11 @@
> "check_mi_thread_command_set: -thread-select 123456789"
>
> foreach thread $thread_list {
> + # line and file are optional.
> + # many of the threads are blocked in libc calls,
> + # and many people have libc's with no symbols.
> mi_gdb_test "-thread-select $thread" \
> - "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \
> + "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
> "check_mi_thread_command_set: -thread-select $thread"
> }
> }
> Index: mi1-pthreads.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi1-pthreads.exp,v
> retrieving revision 1.1
> diff -u -r1.1 mi1-pthreads.exp
> --- mi1-pthreads.exp 1 Oct 2002 16:01:37 -0000 1.1
> +++ mi1-pthreads.exp 4 Jan 2003 05:26:19 -0000
> @@ -1,4 +1,4 @@
> -# Copyright 2002 Free Software Foundation, Inc.
> +# Copyright 2002, 2003 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -191,8 +191,11 @@
> "check_mi_thread_command_set: -thread-select 123456789"
>
> foreach thread $thread_list {
> + # line and file are optional.
> + # many of the threads are blocked in libc calls,
> + # and many people have libc's with no symbols.
> mi_gdb_test "-thread-select $thread" \
> - "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \
> + "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
> "check_mi_thread_command_set: -thread-select $thread"
> }
> }