public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm
@ 2013-09-26 11:14 Omair Javaid
  2013-10-01  8:37 ` Omair Javaid
  2013-11-06 21:14 ` Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Omair Javaid @ 2013-09-26 11:14 UTC (permalink / raw)
  To: gdb-patches; +Cc: Patch Tracking

dw2-case-insensitive.exp: p fuNC_lang fails on arm. The problem occurs
when thumb mode code is generated. On ARM last bit of function pointer
value indicates whether the target function is an ARM (if 0) or Thumb
(if 1) routine. The PC address should refer to actual address in
either case. This patch adds new compile unit and function labels to
code which act as address ranges of compile unit and functions in
debug information. Therefore address ranges will have correct
addresses and not the ones with an incremented least significant bit.
This patch has been tested on x86_64 and arm machines.

gdb/testsuite/ChangeLog:

2013-09-26  Omair Javaid  <Omair.Javaid@linaro.org>

        * gdb.dwarf2/dw2-case-insensitive-debug.S: Updated compile unit and
        function label names.
        * gdb.dwarf2/dw2-case-insensitive.c: Created function and compile
        unit labels.

 .../gdb.dwarf2/dw2-case-insensitive-debug.S        |    8 ++++----
 gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c    |   12 ++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
index db3cce8..22b01f9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
@@ -29,14 +29,14 @@
  .ascii "file1.txt\0" /* DW_AT_name */
  .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
  .byte 8 /* DW_AT_language (DW_LANG_Fortran90) */
- .4byte FUNC_lang /* DW_AT_low_pc */
- .4byte main /* DW_AT_high_pc */
+ .4byte cu_text_start /* DW_AT_low_pc */
+ .4byte cu_text_end /* DW_AT_high_pc */

  .uleb128 3 /* Abbrev: DW_TAG_subprogram */
  .byte 1 /* DW_AT_external */
  .ascii "FUNC_lang\0" /* DW_AT_name */
- .4byte FUNC_lang /* DW_AT_low_pc */
- .4byte main /* DW_AT_high_pc */
+ .4byte FUNC_lang_start /* DW_AT_low_pc */
+ .4byte FUNC_lang_end /* DW_AT_high_pc */
  .byte 1 /* DW_AT_prototyped */
  .4byte .Ltype - .Lcu1_begin /* DW_AT_type */

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
index 09e9683..4b3ea07 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
@@ -16,12 +16,21 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

 /* Use DW_LANG_Fortran90 for case insensitive DWARF.  */
+asm (".globl cu_text_start");
+asm ("cu_text_start:");
+
+asm (".globl FUNC_lang_start");
+asm (".p2align 4");
+asm ("FUNC_lang_start:");

 void
 FUNC_lang (void)
 {
 }

+asm (".globl FUNC_lang_end");
+asm ("FUNC_lang_end:");
+
 /* Symbol is present only in ELF .symtab.  */

 void
@@ -36,3 +45,6 @@ main (void)
   FUNC_symtab ();
   return 0;
 }
+
+asm (".globl cu_text_end");
+asm ("cu_text_end:");
--

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm
  2013-09-26 11:14 [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm Omair Javaid
@ 2013-10-01  8:37 ` Omair Javaid
  2013-11-06 21:14 ` Tom Tromey
  1 sibling, 0 replies; 5+ messages in thread
From: Omair Javaid @ 2013-10-01  8:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: Patch Tracking

On 26 September 2013 16:14, Omair Javaid <omair.javaid@linaro.org> wrote:
> dw2-case-insensitive.exp: p fuNC_lang fails on arm. The problem occurs
> when thumb mode code is generated. On ARM last bit of function pointer
> value indicates whether the target function is an ARM (if 0) or Thumb
> (if 1) routine. The PC address should refer to actual address in
> either case. This patch adds new compile unit and function labels to
> code which act as address ranges of compile unit and functions in
> debug information. Therefore address ranges will have correct
> addresses and not the ones with an incremented least significant bit.
> This patch has been tested on x86_64 and arm machines.
>
> gdb/testsuite/ChangeLog:
>
> 2013-09-26  Omair Javaid  <Omair.Javaid@linaro.org>
>
>         * gdb.dwarf2/dw2-case-insensitive-debug.S: Updated compile unit and
>         function label names.
>         * gdb.dwarf2/dw2-case-insensitive.c: Created function and compile
>         unit labels.
>
>  .../gdb.dwarf2/dw2-case-insensitive-debug.S        |    8 ++++----
>  gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c    |   12 ++++++++++++
>  2 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
> b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
> index db3cce8..22b01f9 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
> @@ -29,14 +29,14 @@
>   .ascii "file1.txt\0" /* DW_AT_name */
>   .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
>   .byte 8 /* DW_AT_language (DW_LANG_Fortran90) */
> - .4byte FUNC_lang /* DW_AT_low_pc */
> - .4byte main /* DW_AT_high_pc */
> + .4byte cu_text_start /* DW_AT_low_pc */
> + .4byte cu_text_end /* DW_AT_high_pc */
>
>   .uleb128 3 /* Abbrev: DW_TAG_subprogram */
>   .byte 1 /* DW_AT_external */
>   .ascii "FUNC_lang\0" /* DW_AT_name */
> - .4byte FUNC_lang /* DW_AT_low_pc */
> - .4byte main /* DW_AT_high_pc */
> + .4byte FUNC_lang_start /* DW_AT_low_pc */
> + .4byte FUNC_lang_end /* DW_AT_high_pc */
>   .byte 1 /* DW_AT_prototyped */
>   .4byte .Ltype - .Lcu1_begin /* DW_AT_type */
>
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
> b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
> index 09e9683..4b3ea07 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
> @@ -16,12 +16,21 @@
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>
>  /* Use DW_LANG_Fortran90 for case insensitive DWARF.  */
> +asm (".globl cu_text_start");
> +asm ("cu_text_start:");
> +
> +asm (".globl FUNC_lang_start");
> +asm (".p2align 4");
> +asm ("FUNC_lang_start:");
>
>  void
>  FUNC_lang (void)
>  {
>  }
>
> +asm (".globl FUNC_lang_end");
> +asm ("FUNC_lang_end:");
> +
>  /* Symbol is present only in ELF .symtab.  */
>
>  void
> @@ -36,3 +45,6 @@ main (void)
>    FUNC_symtab ();
>    return 0;
>  }
> +
> +asm (".globl cu_text_end");
> +asm ("cu_text_end:");
> --

Ping?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm
  2013-09-26 11:14 [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm Omair Javaid
  2013-10-01  8:37 ` Omair Javaid
@ 2013-11-06 21:14 ` Tom Tromey
  2013-11-11  8:31   ` Omair Javaid
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2013-11-06 21:14 UTC (permalink / raw)
  To: Omair Javaid; +Cc: gdb-patches, Patch Tracking

>>>>> "Omair" == Omair Javaid <omair.javaid@linaro.org> writes:

Omair> 2013-09-26  Omair Javaid  <Omair.Javaid@linaro.org>
Omair>         * gdb.dwarf2/dw2-case-insensitive-debug.S: Updated compile unit and
Omair>         function label names.
Omair>         * gdb.dwarf2/dw2-case-insensitive.c: Created function and compile
Omair>         unit labels.

Ok.

Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm
  2013-11-06 21:14 ` Tom Tromey
@ 2013-11-11  8:31   ` Omair Javaid
  2013-11-14 16:04     ` Will Newton
  0 siblings, 1 reply; 5+ messages in thread
From: Omair Javaid @ 2013-11-11  8:31 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, Patch Tracking

On Thu 07 Nov 2013 02:05:28 AM PKT, Tom Tromey wrote:
>>>>>> "Omair" == Omair Javaid <omair.javaid@linaro.org> writes:
>
> Omair> 2013-09-26  Omair Javaid  <Omair.Javaid@linaro.org>
> Omair>         * gdb.dwarf2/dw2-case-insensitive-debug.S: Updated compile unit and
> Omair>         function label names.
> Omair>         * gdb.dwarf2/dw2-case-insensitive.c: Created function and compile
> Omair>         unit labels.
>
> Ok.
>
> Tom
>

Hello Tom,

I don’t have commit rights can you kindly commit this fix for me.

Thanks!

--
Omair.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm
  2013-11-11  8:31   ` Omair Javaid
@ 2013-11-14 16:04     ` Will Newton
  0 siblings, 0 replies; 5+ messages in thread
From: Will Newton @ 2013-11-14 16:04 UTC (permalink / raw)
  To: Omair Javaid; +Cc: Tom Tromey, gdb-patches, Patch Tracking

On 11 November 2013 08:25, Omair Javaid <omair.javaid@linaro.org> wrote:
> On Thu 07 Nov 2013 02:05:28 AM PKT, Tom Tromey wrote:
>>>>>>>
>>>>>>> "Omair" == Omair Javaid <omair.javaid@linaro.org> writes:
>>
>>
>> Omair> 2013-09-26  Omair Javaid  <Omair.Javaid@linaro.org>
>> Omair>         * gdb.dwarf2/dw2-case-insensitive-debug.S: Updated compile
>> unit and
>> Omair>         function label names.
>> Omair>         * gdb.dwarf2/dw2-case-insensitive.c: Created function and
>> compile
>> Omair>         unit labels.
>>
>> Ok.
>>
>> Tom
>>
>
> Hello Tom,
>
> I don’t have commit rights can you kindly commit this fix for me.
>
> Thanks!

I applied this fix on Omair's behalf. (Hopefully I got everything
right as there was some whitespace fixing to be done)

-- 
Will Newton
Toolchain Working Group, Linaro

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-14 15:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-26 11:14 [PATCH] testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm Omair Javaid
2013-10-01  8:37 ` Omair Javaid
2013-11-06 21:14 ` Tom Tromey
2013-11-11  8:31   ` Omair Javaid
2013-11-14 16:04     ` Will Newton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).