mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
Move environment modifications into gdb_init so it's done just once per
test, and clear the GREP_OPTIONS environment variable. See, http://sourceware.org/ml/gdb-patches/2011-03/msg00886.html
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2011-03-25 Andrew Burgess <aburgess@broadcom.com>
|
||||||
|
|
||||||
|
* lib/gdb.exp (default_gdb_start,gdb_init): Clear the GREP_OPTIONS
|
||||||
|
environment variable to make grep output more predictable. Move
|
||||||
|
all the environment setup into gdb_init so it's done once per test
|
||||||
|
case rather than each time we start gdb.
|
||||||
|
|
||||||
2011-03-24 Tom Tromey <tromey@redhat.com>
|
2011-03-24 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.base/label.exp: Use `main:there' linespec. Add re-running
|
* gdb.base/label.exp: Use `main:there' linespec. Add re-running
|
||||||
|
@ -1311,25 +1311,9 @@ proc default_gdb_start { } {
|
|||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
global timeout
|
global timeout
|
||||||
global gdb_spawn_id;
|
global gdb_spawn_id;
|
||||||
global env
|
|
||||||
|
|
||||||
gdb_stop_suppressing_tests;
|
gdb_stop_suppressing_tests;
|
||||||
|
|
||||||
set env(LC_CTYPE) C
|
|
||||||
|
|
||||||
# Don't let a .inputrc file or an existing setting of INPUTRC mess up
|
|
||||||
# the test results. Even if /dev/null doesn't exist on the particular
|
|
||||||
# platform, the readline library will use the default setting just by
|
|
||||||
# failing to open the file. OTOH, opening /dev/null successfully will
|
|
||||||
# also result in the default settings being used since nothing will be
|
|
||||||
# read from this file.
|
|
||||||
set env(INPUTRC) "/dev/null"
|
|
||||||
|
|
||||||
# The gdb.base/readline.exp arrow key test relies on the standard VT100
|
|
||||||
# bindings, so make sure that an appropriate terminal is selected.
|
|
||||||
# The same bug doesn't show up if we use ^P / ^N instead.
|
|
||||||
set env(TERM) "vt100"
|
|
||||||
|
|
||||||
verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
|
verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
|
||||||
|
|
||||||
if [info exists gdb_spawn_id] {
|
if [info exists gdb_spawn_id] {
|
||||||
@ -2796,11 +2780,30 @@ proc gdb_init { args } {
|
|||||||
set banned_variables_traced 1
|
set banned_variables_traced 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# We set LC_ALL and LANG to C so that we get the same messages as
|
# We set LC_ALL, LC_CTYPE, and LANG to C so that we get the same
|
||||||
# expected.
|
# messages as expected.
|
||||||
setenv LC_ALL C
|
setenv LC_ALL C
|
||||||
|
setenv LC_CTYPE C
|
||||||
setenv LANG C
|
setenv LANG C
|
||||||
|
|
||||||
|
# Don't let a .inputrc file or an existing setting of INPUTRC mess up
|
||||||
|
# the test results. Even if /dev/null doesn't exist on the particular
|
||||||
|
# platform, the readline library will use the default setting just by
|
||||||
|
# failing to open the file. OTOH, opening /dev/null successfully will
|
||||||
|
# also result in the default settings being used since nothing will be
|
||||||
|
# read from this file.
|
||||||
|
setenv INPUTRC "/dev/null"
|
||||||
|
|
||||||
|
# The gdb.base/readline.exp arrow key test relies on the standard VT100
|
||||||
|
# bindings, so make sure that an appropriate terminal is selected.
|
||||||
|
# The same bug doesn't show up if we use ^P / ^N instead.
|
||||||
|
setenv TERM "vt100"
|
||||||
|
|
||||||
|
# Some tests (for example gdb.base/maint.exp) shell out from gdb to use
|
||||||
|
# grep. Clear GREP_OPTIONS to make the behavoiur predictable,
|
||||||
|
# especially having color output turned on can cause tests to fail.
|
||||||
|
setenv GREP_OPTIONS ""
|
||||||
|
|
||||||
return [eval default_gdb_init $args];
|
return [eval default_gdb_init $args];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user