This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Do arm_abi detection for ELFOSABI_GNU binaries
- From: Kyle Huey <me at kylehuey dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 8 May 2015 10:11:41 -0700
- Subject: Re: [PATCH] Do arm_abi detection for ELFOSABI_GNU binaries
- Authentication-results: sourceware.org; auth=none
- References: <CAP045ApGo8tPc=97OqrVG4S9GiAP+T1k0ftrP2L3f-kpCDSdJg at mail dot gmail dot com> <86sibzrvtv dot fsf at gmail dot com>
On Fri, Apr 17, 2015 at 1:41 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
> Kyle Huey <me@kylehuey.com> writes:
>
> Hi Kyle,
>
>> On ARM systems, gdb must determine which style of breakpoint to use
>> (see the comments at the beginning of gdb/arm-linux-tdep.c). In
>> arm_gdbarch_init we only attempt to extract the eabi version from the
>> ELF binary if it is a ELFOSABI_NONE binary. If the binary is
>> ELFOSABI_GNU instead, we end up defaulting to the old style OABI
>> syscall breakpoint instruction. On a Linux kernel built without
>> CONFIG_OABI_COMPAT, this triggers a SIGILL in ld when attempting to
>> execute any ELFOSABI_GNU program. (e.g.
>> https://github.com/raspberrypi/linux/issues/766)
>
> Thanks for submitting the patch... Looks GDB doesn't detect the correct
> abi in your case, but you can set arm abi explicitly via "set arm abi AAPCS".
> Hope this can unblock you. In the mean time, I'll think about your patch.
>
> --
> Yao (éå)
Hello Yao,
Thank you for the tip. Have you had a chance to look at the patch?
- Kyle