Re: [PATCH 0/2] dis: Introduce the -f option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> On Tue 2015-08-11 11:47 -0400, Dave Anderson wrote:
> [ ... ]
> > The bug is caused by this part of the 2/2 patch:
> > 
> >   @@ -1655,8 +1660,15 @@ cmd_dis(void)
> >   
> >                           extract_hex(buf2, &curaddr, ':', TRUE);
> >   
> >   +                       if (forward) {
> >   +                               if (curaddr != target)
> >   +                                       continue;
> >   +                               else
> >   +                                       forward = FALSE;
> >   +                       }
> >   +
> >                           if (!reverse)
> >   -                               if ((req->flags & GNU_FUNCTION_ONLY) &&
> >   +                               if (!count_entered &&
> >                                       (curaddr >= req->addr2))
> >                                           break;
> > 
> > req->addr2 is 0 in this case, so it always breaks/fails.
> 
> Indeed; req->addr2 is only relevant in the case of: reverse, forward
> or GNU_FUNCTION_ONLY. Where a single instruction is specified, we should
> not evaluate here. As such the following change should resolve this bug:
> 

> --- a/kernel.c
> +++ b/kernel.c
> @@ -1669,7 +1669,7 @@ cmd_dis(void)
>                         }
>  
>                         if (!reverse)
> -                               if (!count_entered &&
> +                               if (!count_entered && req->addr2 &&
>                                     (curaddr >= req->addr2))
>                                         break;
>  
> 
> --

OK good.  I'm going to run some sanity-checks on most of the other architectures.
I don't foresee any problems, and hopefully I should get this checked in today.

Thanks,
  Dave

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility



[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux