mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 12:39:59 +00:00
Remove useless gcore command detection
Checking whether the gcore command is included in the GDB build as
proxy for checking whether core dumping is supported by the target is
useless, as gcore.o has been in COMMON_OBS since git 9b4eba8e
:
2009-10-26 Michael Snyder <msnyder@vmware.com>
Hui Zhu <teawater@gmail.com>
* Makefile.in (SFILES): Add gcore.c.
(COMMON_OBS): Add gcore.o.
* config/alpha/alpha-linux.mh (NATDEPFILES): Delete gcore.o.
* config/alpha/fbsd.mh (NATDEPFILES): Ditto.
...
IOW, the command is always included in the build.
Instead, nowadays, tests bail out if actually trying to generate a
core fails with an indication the target doesn't support it. See
gdb_gcore_cmd and callers.
Tested on x86_64 Fedora 20.
gdb/testsuite/ChangeLog:
* gdb.base/gcore-buffer-overflow.exp: Remove "help gcore" test.
* gdb.base/gcore-relro-pie.exp: Likewise.
* gdb.base/gcore-relro.exp: Likewise.
* gdb.base/gcore.exp: Likewise.
* gdb.base/print-symbol-loading.exp: Likewise.
* gdb.threads/gcore-thread.exp: Likewise.
* lib/gdb.exp (gdb_gcore_cmd): Don't expect "Undefined command".
This commit is contained in:
parent
c542398150
commit
a8454a7c5a
@ -1,3 +1,13 @@
|
|||||||
|
2014-08-21 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* gdb.base/gcore-buffer-overflow.exp: Remove "help gcore" test.
|
||||||
|
* gdb.base/gcore-relro-pie.exp: Likewise.
|
||||||
|
* gdb.base/gcore-relro.exp: Likewise.
|
||||||
|
* gdb.base/gcore.exp: Likewise.
|
||||||
|
* gdb.base/print-symbol-loading.exp: Likewise.
|
||||||
|
* gdb.threads/gcore-thread.exp: Likewise.
|
||||||
|
* lib/gdb.exp (gdb_gcore_cmd): Don't expect "Undefined command".
|
||||||
|
|
||||||
2014-08-20 Pedro Alves <palves@redhat.com>
|
2014-08-20 Pedro Alves <palves@redhat.com>
|
||||||
Jan Kratochvil <jan.kratochvil@redhat.com>
|
Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
@ -31,18 +31,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
|||||||
|
|
||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
|
|
||||||
# Does this gdb support gcore?
|
|
||||||
gdb_test_multiple "help gcore" "help gcore" {
|
|
||||||
-re "Undefined command: .gcore.*$gdb_prompt $" {
|
|
||||||
# gcore command not supported -- nothing to test here.
|
|
||||||
unsupported "gdb does not support gcore on this target"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "Save a core file .*$gdb_prompt $" {
|
|
||||||
pass "help gcore"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gdb_test_no_output "set args ${pattern}" \
|
gdb_test_no_output "set args ${pattern}" \
|
||||||
"Set buffer exceeding arguments"
|
"Set buffer exceeding arguments"
|
||||||
|
|
||||||
|
@ -39,19 +39,6 @@ file attributes ${stripped_binfile} -permissions $perm
|
|||||||
|
|
||||||
clean_restart ${stripped_binfile}
|
clean_restart ${stripped_binfile}
|
||||||
|
|
||||||
# Does this gdb support gcore?
|
|
||||||
set test "help gcore"
|
|
||||||
gdb_test_multiple $test $test {
|
|
||||||
-re "Undefined command: .gcore.*\r\n$gdb_prompt $" {
|
|
||||||
# gcore command not supported -- nothing to test here.
|
|
||||||
unsupported "gdb does not support gcore on this target"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "Save a core file .*\r\n$gdb_prompt $" {
|
|
||||||
pass $test
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# The binary is stripped of debug info, but not minsyms.
|
# The binary is stripped of debug info, but not minsyms.
|
||||||
if ![runto break_here] {
|
if ![runto break_here] {
|
||||||
fail "Can't run to break_here"
|
fail "Can't run to break_here"
|
||||||
|
@ -38,19 +38,6 @@ set objfile [standard_output_file ${testfile}.o]
|
|||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
gdb_load_shlibs ${binfile_lib}
|
gdb_load_shlibs ${binfile_lib}
|
||||||
|
|
||||||
# Does this gdb support gcore?
|
|
||||||
set test "help gcore"
|
|
||||||
gdb_test_multiple $test $test {
|
|
||||||
-re "Undefined command: .gcore.*\r\n$gdb_prompt $" {
|
|
||||||
# gcore command not supported -- nothing to test here.
|
|
||||||
unsupported "gdb does not support gcore on this target"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "Save a core file .*\r\n$gdb_prompt $" {
|
|
||||||
pass $test
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ![runto lib] {
|
if ![runto lib] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -24,18 +24,6 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Does this gdb support gcore?
|
|
||||||
gdb_test_multiple "help gcore" "help gcore" {
|
|
||||||
-re "Undefined command: .gcore.*$gdb_prompt $" {
|
|
||||||
# gcore command not supported -- nothing to test here.
|
|
||||||
unsupported "gdb does not support gcore on this target"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "Save a core file .*$gdb_prompt $" {
|
|
||||||
pass "help gcore"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if { ! [ runto_main ] } then {
|
if { ! [ runto_main ] } then {
|
||||||
untested gcore.exp
|
untested gcore.exp
|
||||||
return -1
|
return -1
|
||||||
|
@ -40,19 +40,6 @@ if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
|
|||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
gdb_load_shlibs ${binfile_lib}
|
gdb_load_shlibs ${binfile_lib}
|
||||||
|
|
||||||
# Does this gdb support gcore?
|
|
||||||
set test "help gcore"
|
|
||||||
gdb_test_multiple $test $test {
|
|
||||||
-re "Undefined command: .gcore.*\r\n$gdb_prompt $" {
|
|
||||||
# gcore command not supported -- nothing to test here.
|
|
||||||
unsupported "gdb does not support gcore on this target"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "Save a core file .*\r\n$gdb_prompt $" {
|
|
||||||
pass $test
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ![runto lib] {
|
if ![runto lib] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -55,17 +55,6 @@ set nl "\[\r\n\]+"
|
|||||||
|
|
||||||
set timeout 30
|
set timeout 30
|
||||||
|
|
||||||
gdb_test_multiple "help gcore" "help gcore" {
|
|
||||||
-re "Undefined command: .gcore.*$gdb_prompt $" {
|
|
||||||
# gcore command not supported -- nothing to test here.
|
|
||||||
unsupported "gdb does not support gcore on this target"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "Save a core file .*$gdb_prompt $" {
|
|
||||||
pass "help gcore"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if { ! [ runto_main ] } then {
|
if { ! [ runto_main ] } then {
|
||||||
untested gcore-thread.exp
|
untested gcore-thread.exp
|
||||||
return -1
|
return -1
|
||||||
|
@ -3401,12 +3401,6 @@ proc gdb_gcore_cmd {core test} {
|
|||||||
pass $test
|
pass $test
|
||||||
set result 1
|
set result 1
|
||||||
}
|
}
|
||||||
|
|
||||||
-re "Undefined command.*$gdb_prompt $" {
|
|
||||||
unsupported $test
|
|
||||||
verbose -log "'gcore' command undefined in gdb_gcore_cmd"
|
|
||||||
}
|
|
||||||
|
|
||||||
-re "(?:Can't create a corefile|Target does not support core file generation\\.)\[\r\n\]+$gdb_prompt $" {
|
-re "(?:Can't create a corefile|Target does not support core file generation\\.)\[\r\n\]+$gdb_prompt $" {
|
||||||
unsupported $test
|
unsupported $test
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user