This is the mail archive of the gdb-patches@sourceware.org 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]

Re: Regression for gdb.mi/mi-nsmoribund.exp [Re: [4/4] RFC: implement catch load and catch unload]


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> commit 23be81b20039c057ad0af30082f6f8a16a7643e9
Jan> Author: Tom Tromey <tromey@redhat.com>
Jan> Date:   Tue Jan 24 21:39:14 2012 +0000
Jan>         PR symtab/12406:

Jan> It is crashing on all the tested Fedora distros for:
Jan> 	gdb.mi/mi-nsmoribund.exp

Here's the fix.

Built and regtested on x86-64 F15.

Tom

2012-01-25  Tom Tromey  <tromey@redhat.com>

	* breakpoint.c (bpstat_stop_status): Check 'breakpoint_at' before
	dereferencing.

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0da099b..ec7f348 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4303,7 +4303,7 @@ bpstat_stop_status (struct address_space *aspace,
      "catch unload".  */
   for (bs = bs_head; bs != NULL; bs = bs->next)
     {
-      if (bs->breakpoint_at->type == bp_shlib_event)
+      if (bs->breakpoint_at && bs->breakpoint_at->type == bp_shlib_event)
 	{
 	  handle_solib_event ();
 	  break;


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