----- Original Message -----
> When the vmcore or vmlinux is not the same endian with the host,
> crash will give out a error message to show that mismatching, but
> the message itself is not correct.
> This patch fix that logical bug.

Interesting -- I've never been able to actually test this until now -- with
a ppc64/ppc64le combination.  I'm guessing you saw this on a big-endian 
32-bit ARM?  

Good catch -- queued for crash-7.0.9:

  
https://github.com/crash-utility/crash/commit/5b78ac40710048705108cbd2e44d2ddc4cf71d72

Thanks,
  Dave


> 
> Signed-off-by: Hu Keping <[email protected]>
> ---
>  tools.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools.c b/tools.c
> index 4ff3fd5..cb684b1 100644
> --- a/tools.c
> +++ b/tools.c
> @@ -5515,12 +5515,12 @@ endian_mismatch(char *file, char dumpfile_endian,
> ulong query)
>       case ELFDATA2LSB:
>               if (__BYTE_ORDER == __LITTLE_ENDIAN)
>                       return FALSE;
> -             endian = "big-endian";
> +             endian = "little-endian";
>               break;
>       case ELFDATA2MSB:
>               if (__BYTE_ORDER == __BIG_ENDIAN)
>                       return FALSE;
> -             endian = "little-endian";
> +             endian = "big-endian";
>               break;
>       default:
>               endian = "unknown";
> --
> 1.8.5.5
> 
> 

--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to