[Crash-utility] [PATCH 1/2] dis: Make the starting address of a function special for hexadecimal targets too

Dave Anderson anderson at redhat.com
Mon Jul 6 14:08:56 UTC 2015



----- Original Message -----
> If no count is not entered, and the target address is the starting address
> of a function, disassemble the entire function.
> However this is only true, if the given target is symbolic.

Patch 1/2 has been queued for crash-7.1.2:

  https://github.com/crash-utility/crash/commit/39fa580b6de335bfd6284069027ebdc0b9a8c03c

Thanks,
  Dave

> 
> This patch simply removes that restriction when the target is a hexadecimal
> address:
> 
> For example, each of the following commands will return the same result.
> 
>  - Where 0xffffffff80137e9d is assumed to be the address of the
>    first instruction in do_fork()
> 
>   crash> dis 0xffffffff80137e9d
>   crash> dis do_fork
> 
> Signed-off-by: Aaron Tomlin <atomlin at redhat.com>
> ---
>  kernel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel.c b/kernel.c
> index 4932282..628779c 100644
> --- a/kernel.c
> +++ b/kernel.c
> @@ -1436,6 +1436,8 @@ cmd_dis(void)
>  					req->addr);
>  				unfiltered = TRUE;
>  			}
> +			if (!offset)
> +				req->flags |= GNU_FUNCTION_ONLY;
>                  } else if ((sp = symbol_search(args[optind]))) {
>                          req->addr = sp->value;
>  			req->flags |= GNU_FUNCTION_ONLY;
> --
> 2.4.3
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list