This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix gdb.dwarf2/dw2-dir-file-name.exp test for MIPS architectures
- From: Doug Evans <dje at google dot com>
- To: Kwok Cheung Yeung <kcy at codesourcery dot com>
- Cc: Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Fri, 17 Oct 2014 16:17:42 -0700
- Subject: Re: [PATCH] Fix gdb.dwarf2/dw2-dir-file-name.exp test for MIPS architectures
- Authentication-results: sourceware.org; auth=none
- References: <54399A91 dot 8000006 at mentor dot com> <5441066B dot 7000402 at redhat dot com> <54419857 dot 4070504 at codesourcery dot com>
Kwok Cheung Yeung writes:
> Maciej has already reviewed this patch internally, and I can confirm
> that the test still passes cleanly on x86_64 Linux.
>
> If there are no objections I will go ahead and commit it tomorrow.
>
> Thanks,
>
> Kwok
>
> On 17/10/2014 1:07 PM, Pedro Alves wrote:
> > Looks fine to me, but I'd like to hear Maciej's OK on the MIPS specifics too.
> >
> > Please make sure x86_64 still works.
> >
> > I wonder if this test could be simplified using the testsuite's dwarf
> > assembler (Dwarf::assemble).
> >
> >>
> >> Kwok
> >>
> >> 2014-08-14 Kwok Cheung Yeung <kcy@codesourcery.com>
> >>
> >> gdb/testsuite/
> >> * gdb.dwarf2/dw2-dir-file-name.exp (addr_len): New.
> >> (out_cu): Use addr_len for the size of addresses.
> >> (out_line): Likewise. Size DW_LNE_set_address instruction
> >> according to addr_len.
> >> * gdb.dwarf2/dw2-dir-file-name.c (START_INSNS): New.
> >> (FUNC): Add START_INSNS to definition.
Hi.
One nit.
I'm guessing there's an attempt here to have the comments align
properly in the generated file.
@@ -54,8 +62,8 @@ proc out_cu { name cu_dir cu_name line_dir line_name } {
.ascii \"GNU C\\0\" /* DW_AT_producer */
.byte 2 /* DW_AT_language (DW_LANG_C) */
.4byte .Lline_${name}_begin /* DW_AT_stmt_list */
- .4byte ${name}_start /* DW_AT_low_pc */
- .4byte ${name}_end /* DW_AT_high_pc */
+ .${addr_len}byte ${name}_start /* DW_AT_low_pc */
+ .${addr_len}byte ${name}_end /* DW_AT_high_pc */
"
if { $cu_dir != "" } {
puts $f " .ascii $cu_dir /* DW_AT_comp_dir */"
I'd rather not go down this path, and just keep the source
reasonably clean in this regard.
E.g.,
@@ -54,8 +62,8 @@ proc out_cu { name cu_dir cu_name line_dir line_name } {
.ascii \"GNU C\\0\" /* DW_AT_producer */
.byte 2 /* DW_AT_language (DW_LANG_C) */
.4byte .Lline_${name}_begin /* DW_AT_stmt_list */
- .4byte ${name}_start /* DW_AT_low_pc */
- .4byte ${name}_end /* DW_AT_high_pc */
+ .${addr_len}byte ${name}_start /* DW_AT_low_pc */
+ .${addr_len}byte ${name}_end /* DW_AT_high_pc */
"
if { $cu_dir != "" } {
puts $f " .ascii $cu_dir /* DW_AT_comp_dir */"
Thanks.