This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMIT] Fix hppa64 malloc-in-inferior


Ok, this fixes the GDB crash I was seeing when running
gdb.base/call-strs.exp.  The code was derefencing a null pointer (bad
Randolph, no cookie ;-).

Anyway, this knocks a few more FAILs from the testsuite and introduces
a few new ones since a couple of tests actually run now since GDB
doesn't crash anymore.  Most of the failures now seem to be caused by
the:

   Cannot find bounds of current function (@0x0), unwinding will fail.

problem.  So that's next on my list...

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* hppa-hpux-tdep.c (hppa64_hpux_search_dummy_call_sequence): Check
	whether the name returned by find_pc_partial_function is a null
	pointer, not whether it is an empty string.

Index: hppa-hpux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-hpux-tdep.c,v
retrieving revision 1.37
diff -u -p -r1.37 hppa-hpux-tdep.c
--- hppa-hpux-tdep.c 17 Dec 2004 19:21:20 -0000 1.37
+++ hppa-hpux-tdep.c 19 Dec 2004 21:57:19 -0000
@@ -1466,7 +1466,7 @@ hppa64_hpux_search_dummy_call_sequence (
       find_pc_partial_function (SYMBOL_VALUE_ADDRESS (msym), &name,
       				&begin, &end);
 
-      if (*name == 0 || begin == 0 || end == 0)
+      if (name == NULL || begin == 0 || end == 0)
         continue;
 
       if (target_read_memory (end - sizeof (insns), (char *)insns, sizeof (insns)) == 0)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]