aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-tdep.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-10-06 21:10:33 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-10-06 21:10:33 +0000
commit2e24f4aab7c23f3881a8fec9cb8192aae87caf0a (patch)
tree74b562e7fc4ca28a1f855ac2c55192ecba7b6de3 /gdb/ppc-linux-tdep.c
parent39dc86500ae1acf0b01897624999f5cb8dbca1fb (diff)
downloadgdb-2e24f4aab7c23f3881a8fec9cb8192aae87caf0a.zip
gdb-2e24f4aab7c23f3881a8fec9cb8192aae87caf0a.tar.gz
gdb-2e24f4aab7c23f3881a8fec9cb8192aae87caf0a.tar.bz2
gdb/
Fix crash during stepping on ppc32. * ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code): Test NULL SYM. gdb/testsuite/ Fix crash during stepping on ppc32. * gdb.base/step-symless.c: New file. * gdb.base/step-symless.exp: New file.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index c7b70db..ccded83 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -648,8 +648,9 @@ powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc)
/* Check if we are in the resolver. */
sym = lookup_minimal_symbol_by_pc (pc);
- if ((strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0)
- || (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0))
+ if (sym != NULL
+ && (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0
+ || strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0))
return 1;
return 0;