Hi Boiko,
On 10/5/26 3:44 AM, Boiko Alex wrote:
> On Sat, Oct 3, 2026 at 9:26 AM Dave Young <yangrr.2009(a)tsinghua.org.cn>
> wrote:
>
>>
>>
>> On 10/3/26 3:20 PM, Dave Young wrote:
>>>
>>>
>>> On 10/3/26 1:32 PM, Dave Young wrote:
>>>> Hi Boiko,
>>>>
>>>> I will review it. But please resend via either embed the patch in
>> email body via email client (not an attachment), or send it via git
>> send-email.
>>>
>>> Copy some comments here, but please make sure to send plain text inline
>> patch as above (use git send-email for safe if you are not sure how to
>> setup email clients).
>>>
>>> /* necessary header files */
>>> typedef unsigned int u32;
>>> +#if defined(X86_64) && !defined(__x86_64__)
>>> +#include "lkcd_x86_64_pt_regs.h" /* for pt_regs
>> */
>>> +#else
>>> #include <asm/ptrace.h> /* for pt_regs
>> */
>>> +#endif
>>>
>>>
>>> Above chunk is unreachable. That #include sits inside below if condition:
>>> #if defined(ARM) || defined(X86) || defined(PPC) || defined(S390) || \
>>> defined(S390X) || defined(ARM64) || defined(MIPS) || \
>>> defined(MIPS64) || defined(SPARC64) || defined(RISCV64) || \
>>> defined(LOONGARCH64)
>>>
>>>
>>> 2. Remove TARGET_CFLAGS_X86_64_ON_ARM64 as it is identical to the
>> TARGET_CFLAGS_X86_64
>>>
>>> 3. machine_type("X86") in filesys.c is unreachable: configure.c
never
>> allows target=X86 on an arm64 host. Harmless defensive symmetry.
>>>
>>>
>>> 4. lkcd_x86_64_pt_regs.h: Copyright line is wrong (2025), please remove
>> or update it.
>>
>>
>> 5. below chunk is not for supporting x86_64 on arm64, please separate it
>> in another patch:
>> if ((target_data.initial_gdb_target == ARM64) &&
>> (target_data.target != ARM64)) {
>> - if (target_data.target == X86_64)
>> + if ((target_data.target == X86_64) &&
>> + (target_data.host == X86_64))
>> target_data.target = ARM64;
>> else
>> arch_mismatch(sp);
>>
>
> without it, would be wrong gdb arch and wrong build after native arm64
> build, so it directly related
Ok, it confuses sometimes, I thought about the host checking. how about make it clearer
like below:
if ((target_data.initial_gdb_target == ARM64) &&
(target_data.target != ARM64)) {
if (target_data.host == ARM64) {
/*
* The gdb in this tree is a native ARM64 gdb; it cannot
* serve any other target, so a clean rebuild is required.
*/
arch_mismatch(sp);
} else if (target_data.host == X86_64 && target_data.target == X86_64) {
/*
* An ARM64 cross gdb built on an X86_64 host is sticky.
*/
target_data.target = ARM64;
} else
arch_mismatch(sp);
}
>
> $ make target=x86_64 lzo snappy zstd
>>
>> TARGET: ARM64
>>
>> CRASH: 9.0.3++
>>
>> GDB: 16.2
>>
>>
>>
>> gcc -c -g -DARM64 -DLZO -DSNAPPY -DZSTD -DGDB_16_2 build_data.c
>>
>> gcc -c -g -DARM64 -DLZO -DSNAPPY -DZSTD -DGDB_16_2 diskdump.c
>>
>> ar -rs crashlib.a main.o tools.o global_data.o memory.o filesys.o help.o
>> task.o build_data.o kernel.o test.o gdb_interface.o net.o dev.o bpf.o
>> printk.o alpha.o x86.o ppc.o ia64.o s390.o s390x.o s390dbf.o ppc64.o
>> x86_64.o arm.o arm64.o mips.o mips64.o riscv64.o loongarch64.o sparc64.o
>> extensions.o remote.o va_server.o va_server_v1.o symbols.o cmdline.o
>> lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o
>> lkcd_fix_mem.o s390_dump.o netdump.o diskdump.o makedumpfile.o xendump.o
>> lkcd_x86_trace.o unwind_v1.o unwind_v2.o unwind_v3.o unwind_x86_32_64.o
>> unwind_arm.o xen_hyper.o xen_hyper_command.o xen_hyper_global_data.o
>> xen_hyper_dump_tables.o kvmdump.o qemu.o qemu-load.o sadump.o ipcs.o
>> ramdump.o vmware_vmss.o vmware_guestdump.o xen_dom0.o kaslr_helper.o
>> sbitmap.o maple_tree.o lzorle_decompress.o
>> make[4]: warning: Clock skew detected. Your build may be incomplete.
>>
>> CXXLD gdb
>>
>
>
>
> instead of
>
>
>> $make target=x86_64 lzo snappy zstd
>>
>>
>>
>> The initial build in this source tree was for the ARM64 architecture.
>>
>>
>>
>> In order to build a crash binary for the X86_64 architecture:
>>
>> 1. remove the gdb-16.2 subdirectory
>>
>> 2. perform a "make clean"
>>
>> 3. retry the build
>>
>
>
>
> make: *** [Makefile:306: all] Error 1
>
>>
>>>
>>>
>>>>
>>>> On 10/2/26 10:33 PM, Boiko Alex wrote:
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Crash-utility mailing list -- devel(a)lists.crash-utility.osci.io
>>>>> To unsubscribe send an email to
>> devel-leave(a)lists.crash-utility.osci.io
>>>>>
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
>>>>> Contribution Guidelines:
https://github.com/crash-utility/crash/wiki
>>>> --
>>>> Crash-utility mailing list -- devel(a)lists.crash-utility.osci.io
>>>> To unsubscribe send an email to devel-leave(a)lists.crash-utility.osci.io
>>>> https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
>>>> Contribution Guidelines:
https://github.com/crash-utility/crash/wiki
>>> --
>>> Crash-utility mailing list -- devel(a)lists.crash-utility.osci.io
>>> To unsubscribe send an email to devel-leave(a)lists.crash-utility.osci.io
>>> https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
>>> Contribution Guidelines:
https://github.com/crash-utility/crash/wiki
>>
>>
>