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: [PATCH] Fix for PR 15413 (segfault when completing "condition" for pending bp)


On 05/07/2013 04:39 AM, Sergio Durigan Junior wrote:

> -	for (loc = b->loc; loc; loc = loc->next)
> -	  {
> -	    char location[50];
> -
> -	    if (single)
> -	      xsnprintf (location, sizeof (location), "%d", b->number);
> -	    else
> -	      xsnprintf (location, sizeof (location),  "%d.%d", b->number,
> -			 count);
> +	{
> +	  char location[50];

This is no longer a location.  So s/location/number/g.

>  
> +# Complete the condition (PR 15413).
> +# This test must come right after we set the first pending breakpoint, and
> +# before we set any other breakpoint, since we are testing if the "condition"
> +# command can properly complete its argument.  The PR only fails if there
> +# is only one pending breakpoint set (without anything else).

This last sentence isn't right.  You only need a pending breakpoint to
trigger the crash, it doesn't matter how many breakpoints you have.

> +gdb_test "complete condition " "condition 1"

OK with these fixed, mainline and 7.6.

Thanks,
-- 
Pedro Alves


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