----- Original Message -----
----- 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
Hi Aaron,
The testing went OK as expected, although I did make a couple minor additions.
In help.c, I added "f" to the SYNOPSIS line, and added an example to the help
page. And in kernel.c, I made the -f and -r options mutually exclusive.
Queued for crash-7.1.3:
https://github.com/crash-utility/crash/commit/4935c333a6cd1e7a8949eda5331...
Nice cleanup of cmd_dis() and a nifty addition to the toolbox!
Thanks,
Dave