This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM
- From: Omair Javaid <omair dot javaid at linaro dot org>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 19 Sep 2013 16:30:47 +0100
- Subject: Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM
- Authentication-results: sourceware.org; auth=none
- References: <CANW4E-2bQYjx6YdR3qGyKUsQa_KOrtmkWsZYqKzcuQBF==RPpw at mail dot gmail dot com> <CANW4E-25HdXYKMk258iO=GZ=PNM=Zu4jMbstpkSoMgE9wFpmkQ at mail dot gmail dot com> <51E4B587 dot 70007 at codesourcery dot com>
Yao,
Thanks for your feedback.
Here is the testcase without my patch and breakpoint address gets
adjusted because an odd address was being used:
(gdb) break func
warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc.
Breakpoint 1 at 0x83bc (2 locations)
(gdb) run
Starting program:
/home/linaro/omair/bug_triage/gdb-7.6/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter
warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc.
warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc.
warning: Breakpoint address adjusted from 0x000083bd to 0x000083bc.
warning: Breakpoint 1 address previously adjusted from 0x000083bd to 0x000083bc.
Breakpoint 1, 0x000083bc in func ()
(gdb) p/x param
No symbol "param" in current context.
(gdb) FAIL: gdb.dwarf2/dw2-ifort-parameter.exp: p/x param
testcase ./gdb.dwarf2/dw2-ifort-parameter.exp completed in 0 seconds
Can you suggest any other way to fix this issue.
Thanks you for you help.
--
Omair.
On 16 July 2013 03:52, Yao Qi <yao@codesourcery.com> wrote:
> On 07/15/2013 06:25 PM, Omair Javaid wrote:
>>
>> gdb.dwarf2/dw2-ifort-parameter fails on ARM because the dwarf2 debug
>> information being created by gdb.dwarf2/dw2-ifort-parameter-debug.S
>> gets corrupted because LSB of function addresses is ON in Thumb mode.
>> ARM instructions are word aligned and LSB of instruction address is
>> used to determine whether code being branched to is Thumb or ARM code.
>> This patch solves the problem by decrementing function address by one
>> in thumb mode. This patch has been tested on x86_64 and arm7 machines.
>
>
> Omair,
> IMO, the last bit of "function pointer value" indicates whether the target
> function is an ARM or a thumb one. The "address" should still refer to the
> actual address, as "DWARF should tell the truth". What is wrong *without*
> your patch?
>
> --
> Yao (éå)