|
|
0a406a |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
0a406a |
From: Fedora GDB patches <invalid@email.com>
|
|
|
0a406a |
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
0a406a |
Subject: gdb-test-pid0-core.patch
|
|
|
0a406a |
|
|
|
0a406a |
;; New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
|
|
|
0a406a |
;;=fedoratest
|
|
|
0a406a |
|
|
|
0a406a |
https://bugzilla.redhat.com/show_bug.cgi?id=611435
|
|
|
0a406a |
|
|
|
0a406a |
Fix:
|
|
|
0a406a |
Re: [RFA]corelow.c: Add tid to add_to_thread_list
|
|
|
0a406a |
http://sourceware.org/ml/gdb-patches/2010-08/msg00085.html
|
|
|
0a406a |
http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html
|
|
|
0a406a |
2e5bcfdef1ec3883d48c3f87a4be5c0dff25e17e
|
|
|
0a406a |
|
|
|
0a406a |
diff --git a/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu
|
|
|
0a406a |
new file mode 100644
|
|
|
0a406a |
--- /dev/null
|
|
|
0a406a |
+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu
|
|
|
0a406a |
@@ -0,0 +1,20 @@
|
|
|
0a406a |
+begin 600 x86_64-pid0-core.core.bz2
|
|
|
0a406a |
+M0EIH.3%!629362,CA>P!$/'_____^*#EZ-A!SP36P&_:G0#=14``04A&8,'U
|
|
|
0a406a |
+M2*9`>$$)P`*RN"#*;#4R()IJ8C$TT&FC3$&@`T`#:C1H8C0T,@,FC,D"4T2!
|
|
|
0a406a |
+M"/2CU'B90]31ZAD#U`&AZF@/4:``!HT&F@!H<`#0-`-#0``#3$-&F@```#0R
|
|
|
0a406a |
+M``#")2FD]2>4]0TTT-!HTT--,0,"#$`R!I@AD`#1H,3&GZT.4TO$#H40/`0C
|
|
|
0a406a |
+M2$IRXS,<55!8T,&&,R.Z441"?J9I%G6GUA2!.[]Z"C5S[&19,%VS7E6[3"60
|
|
|
0a406a |
+M@`-*2G)QEQ(;?0Y<=MK]/U?Q)LB%+F37TJ9BI*46)H'*Z@V"`"$"P7]&
|
|
|
0a406a |
+M>XZ:JE0E<*:#1M$P3G]>VCI)(A!O$64`5$4`E$$-.``7&(09`8HO`B6K!Q^&
|
|
|
0a406a |
+M562%N)2+0@*HB@%D@5$%!*0!L1&0D4D6\:-$A`)`+<6D82PP*H(J(H!?F;0$
|
|
|
0a406a |
+M%PXB7N!2D4!44`W7"ADEQM6
|
|
|
0a406a |
+M8"W*_;DV<AN#,XRU]Q-J2FDAFKAQ(9A+ZK$MCY#EI8:W-(15>O9TBO5,_]1)
|
|
|
0a406a |
+M($Q2))#),UE,QQK)E$,3D\W.>!4)QO8A_@^Z_SXS
|
|
|
0a406a |
+MW+@WN)O)YO;3:I9YW-A$)N'2
|
|
|
0a406a |
+M,JV"N(Z:@0E#)50BSF)$T6_IN)#"Z8PLQ4UQ9]@Z'+;T]990-:Y:2`P26#!D
|
|
|
0a406a |
+MV+0L6"X@C9`GHAGSY7)%LWOY+E[2/>4;Q8=HV6[:&$@2$@$R29IBW)K%3"O`
|
|
|
0a406a |
+M9^Y0YJ&BXY1U2HTZ5)2H-V\_(.DZHWE+C#WS($(!I"3CUH2#(+(OWUV"*<<9
|
|
|
0a406a |
+MJ%A!J[%O.P&V%GI.`L7<1@0>,^1F\MY=V5UT,&NOG%7TTZ[03!@BHB@&)
|
|
|
0a406a |
+4B.Z!/,0-IZ^W_Q=R13A0D",CA>P`
|
|
|
0a406a |
+`
|
|
|
0a406a |
+end
|
|
|
0a406a |
diff --git a/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp
|
|
|
0a406a |
new file mode 100644
|
|
|
0a406a |
--- /dev/null
|
|
|
0a406a |
+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp
|
|
|
0a406a |
@@ -0,0 +1,46 @@
|
|
|
0a406a |
+# This testcase is part of GDB, the GNU debugger.
|
|
|
0a406a |
+#
|
|
|
0a406a |
+# Copyright 2010 Free Software Foundation, Inc.
|
|
|
0a406a |
+#
|
|
|
0a406a |
+# This program is free software; you can redistribute it and/or modify
|
|
|
0a406a |
+# it under the terms of the GNU General Public License as published by
|
|
|
0a406a |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
0a406a |
+# (at your option) any later version.
|
|
|
0a406a |
+#
|
|
|
0a406a |
+# This program is distributed in the hope that it will be useful,
|
|
|
0a406a |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
0a406a |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
0a406a |
+# GNU General Public License for more details.
|
|
|
0a406a |
+#
|
|
|
0a406a |
+# You should have received a copy of the GNU General Public License
|
|
|
0a406a |
+# along with this program; if not, write to the Free Software
|
|
|
0a406a |
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
0a406a |
+
|
|
|
0a406a |
+# Some kernel core files have PID 0 - for the idle task.
|
|
|
0a406a |
+
|
|
|
0a406a |
+if ![istarget "x86_64-*-*"] {
|
|
|
0a406a |
+ verbose "Skipping x86_64-pid0-core test."
|
|
|
0a406a |
+ return
|
|
|
0a406a |
+}
|
|
|
0a406a |
+
|
|
|
0a406a |
+set testfile "x86_64-pid0-core"
|
|
|
0a406a |
+set corebz2uufile ${srcdir}/${subdir}/${testfile}.core.bz2.uu
|
|
|
0a406a |
+set corefile [standard_output_file ${testfile}.core]
|
|
|
0a406a |
+
|
|
|
0a406a |
+if {[catch "system \"uudecode -o - ${corebz2uufile} | bzip2 -dc >${corefile}\""] != 0} {
|
|
|
0a406a |
+ untested "failed uudecode or bzip2"
|
|
|
0a406a |
+ return -1
|
|
|
0a406a |
+}
|
|
|
0a406a |
+file stat ${corefile} corestat
|
|
|
0a406a |
+if {$corestat(size) != 8798208} {
|
|
|
0a406a |
+ untested "uudecode or bzip2 produce invalid result"
|
|
|
0a406a |
+ return -1
|
|
|
0a406a |
+}
|
|
|
0a406a |
+
|
|
|
0a406a |
+gdb_exit
|
|
|
0a406a |
+gdb_start
|
|
|
0a406a |
+gdb_reinitialize_dir $srcdir/$subdir
|
|
|
0a406a |
+
|
|
|
0a406a |
+# Former crash was:
|
|
|
0a406a |
+# thread.c:884: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
|
|
|
0a406a |
+gdb_test "core-file ${corefile}" "Program terminated with signal (11|SIGSEGV), Segmentation fault\\.\r\n.*"
|