Commit Graph

1 Commits

Author SHA1 Message Date
HATAYAMA Daisuke
ae4ad4d495 x86: Fix failure of collecting vsyscall mapping due to change of enum type of vsyscall_mode
Backport from the upstream crash-gcore.

commit 03f9360715731f18e4fdae7b30aa34b30dddcd57
Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
Date:   Sat Mar 26 21:42:02 2022 +0900

    x86: Fix failure of collecting vsyscall mapping due to change of enum type of vsyscall_mode

    vsyscall mapping fails to get collected because the commit
    bd49e16e3339 (x86/vsyscall: Add a new vsyscall=xonly mode) merged at
    kernel v5.2-rc7 added constant XONLY to the anonymous enumeration type
    of variable vsyscall_mode, which made the value of constant NONE
    change from 1 to 2.

    This commit fixes the issue by checking the value of constant NONE
    using gdb's print command and typeof operator since there's no utility
    function to handle such anonymous enumeration type currently in crash
    utility.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-07-26 15:13:42 +09:00