1 http://sourceware.org/ml/gdb-patches/2012-09/msg00598.html
2 Subject: [patch+7.5] Fix ppc32 7.5 stepping crash regression
7 [PATCH] PowerPC 32 with Secure PLT
8 http://sourceware.org/ml/gdb-patches/2012-01/msg00655.html
9 http://sourceware.org/ml/gdb-patches/2012-01/msg00656.html
10 commit 4d19ed66762845cdcce95f8b1daaceb97cf90c71
12 Date: Mon Jan 30 17:09:37 2012 +0000
13 Support stepping through PPC PLT with securePLT.
16 Single stepping until exit from function main,
17 which has no line number information.
19 Program received signal SIGSEGV, Segmentation fault.
20 0x00000000100898d8 in powerpc_linux_in_dynsym_resolve_code (pc=268436636) at ppc-linux-tdep.c:651
21 651 if ((strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0)
23 $1 = (struct minimal_symbol *) 0x0
25 #0 0x00000000100898d8 in powerpc_linux_in_dynsym_resolve_code (pc=268436636) at ppc-linux-tdep.c:651
26 #1 0x00000000103fdf44 in in_solib_dynsym_resolve_code (pc=268436636) at solib.c:1185
27 #2 0x000000001025d848 in handle_inferior_event (ecs=0xfffffbbdcf0) at infrun.c:4737
32 Not regression tested.
40 2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
42 Fix crash during stepping on ppc32.
43 * ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code): Test NULL
47 2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
49 Fix crash during stepping on ppc32.
50 * gdb.base/step-symless.c: New file.
51 * gdb.base/step-symless.exp: New file.
53 diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
54 index c7b70db..ccded83 100644
55 --- a/gdb/ppc-linux-tdep.c
56 +++ b/gdb/ppc-linux-tdep.c
57 @@ -648,8 +648,9 @@ powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc)
59 /* Check if we are in the resolver. */
60 sym = lookup_minimal_symbol_by_pc (pc);
61 - if ((strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0)
62 - || (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0))
64 + && (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0
65 + || strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0))
69 diff --git a/gdb/testsuite/gdb.base/step-symless.c b/gdb/testsuite/gdb.base/step-symless.c
71 index 0000000..97eaf5e
73 +++ b/gdb/testsuite/gdb.base/step-symless.c
75 +/* This testcase is part of GDB, the GNU debugger.
77 + Copyright 2012 Free Software Foundation, Inc.
79 + This program is free software; you can redistribute it and/or modify
80 + it under the terms of the GNU General Public License as published by
81 + the Free Software Foundation; either version 3 of the License, or
82 + (at your option) any later version.
84 + This program is distributed in the hope that it will be useful,
85 + but WITHOUT ANY WARRANTY; without even the implied warranty of
86 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
87 + GNU General Public License for more details.
89 + You should have received a copy of the GNU General Public License
90 + along with this program. If not, see <http://www.gnu.org/licenses/>. */
92 +static volatile int v;
113 diff --git a/gdb/testsuite/gdb.base/step-symless.exp b/gdb/testsuite/gdb.base/step-symless.exp
115 index 0000000..d79edb2
117 +++ b/gdb/testsuite/gdb.base/step-symless.exp
119 +# Copyright (C) 2012 Free Software Foundation, Inc.
121 +# This program is free software; you can redistribute it and/or modify
122 +# it under the terms of the GNU General Public License as published by
123 +# the Free Software Foundation; either version 3 of the License, or
124 +# (at your option) any later version.
126 +# This program is distributed in the hope that it will be useful,
127 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
128 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
129 +# GNU General Public License for more details.
131 +# You should have received a copy of the GNU General Public License
132 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
135 +if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {nodebug}] == -1} {
139 +# We need those symbols global to access them from the .S file.
140 +set test "strip stub symbols"
141 +set objcopy_program [transform objcopy]
142 +set result [catch "exec $objcopy_program -N symless ${binfile}" output]
143 +verbose "result is $result"
144 +verbose "output is $output"
151 +clean_restart $testfile
157 +gdb_breakpoint symful
159 +gdb_test "step" "Single stepping until exit.*no line number information.*\r\nBreakpoint \[^\r\n\]* in \\.?symful \\(\\)"