Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Kwok Cheung Yeung <kcy@codesourcery.com>
Cc: Pedro Alves <palves@redhat.com>,    <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix gdb.dwarf2/dw2-dir-file-name.exp test for MIPS architectures
Date: Fri, 17 Oct 2014 23:17:00 -0000	[thread overview]
Message-ID: <21569.41878.581721.500583@ruffy.mtv.corp.google.com> (raw)
In-Reply-To: <54419857.4070504@codesourcery.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.


  reply	other threads:[~2014-10-17 23:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11 21:01 Kwok Cheung Yeung
2014-10-17 12:07 ` Pedro Alves
2014-10-17 22:29   ` Kwok Cheung Yeung
2014-10-17 23:17     ` Doug Evans [this message]
2014-10-21 22:26     ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21569.41878.581721.500583@ruffy.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kcy@codesourcery.com \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox