Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: implptrconst.exp error on 32-bit targets  [Re: [3/4] fix DW_OP_GNU_implicit_pointer pointing to a constant]
Date: Mon, 13 May 2013 17:30:00 -0000	[thread overview]
Message-ID: <87li7ibxf0.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20130512151434.GA7026@host2.jankratochvil.net> (Jan Kratochvil's	message of "Sun, 12 May 2013 17:14:34 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> runtest CC_FOR_TARGET="gcc -m32" gdb.dwarf2/implptrconst.exp
Jan> gdb compile failed, .../gdb/testsuite/gdb.dwarf2/implptrconst-dw.S:
Jan> Assembler messages:
Jan> .../gdb/testsuite/gdb.dwarf2/implptrconst-dw.S:42: Error: cannot
Jan> represent relocation type BFD_RELOC_64

Jan> Fedora 19 x86_64

Jan> So it should be either made 32-bit clean or it should be skipped for 32-bit
Jan> targets.

Let me know what you think of this.
I tested it on x86-64 Fedora 18, both ways.

Tom

b/gdb/testsuite/ChangeLog:
2013-05-13  Tom Tromey  <tromey@redhat.com>

	* gdb.dwarf2/implptrconst.exp: Create a CU with 4 byte address
	size and change type sizes to 4 bytes.

diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 4ce1713..7eca600 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -27,7 +27,9 @@ standard_testfile .c implptrconst-dw.S
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
-    cu 0 2 8 {
+    # Creating a CU with 4-byte addresses lets this test link on both
+    # 32- and 64-bit machines.
+    cu 0 2 4 {
  	compile_unit {} {
 	    declare_labels byte_label size_type_label array_label
 	    declare_labels var_label ptr_label
@@ -41,7 +43,7 @@ Dwarf::assemble $asm_file {
 	    size_type_label: base_type {
 		{name sizetype}
 		{encoding @DW_ATE_unsigned}
-		{byte_size 8 DW_FORM_sdata}
+		{byte_size 4 DW_FORM_sdata}
 	    }
 
 	    array_label: array_type {
@@ -60,7 +62,7 @@ Dwarf::assemble $asm_file {
 	    }
 
 	    ptr_label: pointer_type {
-		{byte_size 8 DW_FORM_sdata}
+		{byte_size 4 DW_FORM_sdata}
 		{type :$byte_label}
 	    }
 


  reply	other threads:[~2013-05-13 17:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11  2:44 [3/4] fix DW_OP_GNU_implicit_pointer pointing to a constant Tom Tromey
2013-05-06 19:40 ` Tom Tromey
2013-05-12 15:14   ` implptrconst.exp error on 32-bit targets [Re: [3/4] fix DW_OP_GNU_implicit_pointer pointing to a constant] Jan Kratochvil
2013-05-13 17:30     ` Tom Tromey [this message]
2013-05-13 18:42       ` Jan Kratochvil
2013-05-13 19:32         ` Tom Tromey

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=87li7ibxf0.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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