[Crash-utility] Re: [PATCH 5/5] Fix build failure on 32bit machine(i686)

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

 



On Tue, Feb 4, 2025 at 10:19 PM Tao Liu <ltao@xxxxxxxxxx> wrote:
>
> From: Lianbo Jiang <lijiang@xxxxxxxxxx>
>
> This issue was caused by commit 0f39e33d3504 with the following
> compilation error:
>
>   frame.c: In function ‘CORE_ADDR frame_unwind_pc(frame_info*)’:
>   frame.c:982:35: error: cannot convert ‘CORE_ADDR*’ {aka ‘long long unsigned int*’} to ‘ulong*’ {aka ‘long unsigned int*’}
>     982 |           crash_decode_ptrauth_pc(&pc);
>         |                                   ^~~
>         |                                   |
>         |                                   CORE_ADDR* {aka long long unsigned int*}
>   frame.c:948:48: note: initializing argument 1 of ‘void crash_decode_ptrauth_pc(ulong*)’
>     948 | extern "C" void crash_decode_ptrauth_pc(ulong* pc);
>         |                                         ~~~~~~~^~
>
> Fixes: 0f39e33d3504 ("arm64: add pac mask to better support gdb stack unwind")
> Reported-by: Guanyou.Chen <chenguanyou@xxxxxxxxxx>
> Signed-off-by: Lianbo Jiang <lijiang@xxxxxxxxxx>
> ---
>  gdb-16.2.patch  | 6 +++---
>  gdb_interface.c | 4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/gdb-16.2.patch b/gdb-16.2.patch
> index 7fdde45..03919fc 100644
> --- a/gdb-16.2.patch
> +++ b/gdb-16.2.patch
> @@ -53,7 +53,7 @@ exit 0
>   # your system doesn't have fcntl.h in /usr/include (which is where it
>   # should be according to Posix).
>  -DEFS = @DEFS@
> -+DEFS = -DCRASH_MERGE @DEFS@
> ++DEFS = -DCRASH_MERGE -DTARGET_${CRASH_TARGET} @DEFS@

^^^^ sorry for the same correction as [1].

[1]: https://www.mail-archive.com/devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx/msg01336.html

>   GDB_INCLUDED_HEADER = -include $(srcdir)/defs.h
>   GDB_CFLAGS = \
>         -I. \
> @@ -2215,7 +2215,7 @@ exit 0
>     return NULL;
>   }
>
> -+#ifdef CRASH_MERGE
> ++#if defined(CRASH_MERGE) && defined(ARM64)
>  +extern "C" void crash_decode_ptrauth_pc(ulong* pc);
>  +#endif
>  +
> @@ -2226,7 +2226,7 @@ exit 0
>         try
>         {
>           pc = gdbarch_unwind_pc (prev_gdbarch, this_frame);
> -+#ifdef CRASH_MERGE
> ++#if defined(CRASH_MERGE) && defined(ARM64)
>  +        crash_decode_ptrauth_pc(&pc);
>  +#endif
>           pc_p = true;
> diff --git a/gdb_interface.c b/gdb_interface.c
> index de62bc2..fa2e85b 100644
> --- a/gdb_interface.c
> +++ b/gdb_interface.c
> @@ -1086,12 +1086,12 @@ int crash_get_current_task_reg (int regno, const char *regname,
>  }
>
>  /* arm64 kernel lr maybe has patuh */
> +#ifdef ARM64
>  void crash_decode_ptrauth_pc(ulong *pc);
>  void crash_decode_ptrauth_pc(ulong *pc)
>  {
> -#ifdef ARM64
>         struct machine_specific *ms = machdep->machspec;
>         if (is_kernel_text(*pc | ms->CONFIG_ARM64_KERNELPACMASK))
>                 *pc |= ms->CONFIG_ARM64_KERNELPACMASK;
> -#endif /* !ARM64 */
>  }
> +#endif /* !ARM64 */
> --
> 2.47.0
>
--
Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




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

 

Powered by Linux