From: Luis Machado <lgustavo@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Stan Shebs <stanshebs@earthlink.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.
Date: Tue, 02 Jul 2013 18:50:00 -0000 [thread overview]
Message-ID: <51D32100.4000901@codesourcery.com> (raw)
In-Reply-To: <87wqp8estz.fsf@fleche.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 631 bytes --]
On 07/02/2013 03:10 PM, Tom Tromey wrote:
>>> It could be, if we can guarantee oddball architectures don't use
>>> pointers and addresses of strange sizes, say, an arch that declares
>>> function pointers of 4 bytes.
>
> Stan> You could test both a function address and a data address, and if either
> Stan> is greater than 4 bytes, the old formats can be excluded from testing.
>
> FWIW I'm actually ok with the original patch as well.
> So if Stan is happy with it, it is ok.
What about this one?
I feel i repeated myself in the comments a little, in an attempt to make
things clear. It may sound like a broken LP. :-)
Luis
[-- Attachment #2: dump_mips.diff --]
[-- Type: text/x-patch, Size: 2251 bytes --]
2013-07-02 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/dump.exp: Update copyright line.
Remove arch-specific tests and do a generic pointer size
check to set is64bitonly correctly.
Index: testsuite/gdb.base/dump.exp
===================================================================
--- testsuite/gdb.base/dump.exp (revision 415809)
+++ testsuite/gdb.base/dump.exp (working copy)
@@ -1,4 +1,4 @@
-# Copyright 2002, 2004, 2007-2012 Free Software Foundation, Inc.
+# Copyright 2002, 2004, 2007-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,16 +32,6 @@
lappend options "additional_flags=-Wl,-taso"
}
-if {[istarget "ia64*-*-*"] || [istarget "hppa64-*-*"]} then {
- set is64bitonly "yes"
-}
-
-if {[istarget "spu*-*-*"]} then {
- # The internal address format used for the combined Cell/B.E.
- # debugger requires 64-bit.
- set is64bitonly "yes"
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${options}] != "" } {
untested dump.exp
return -1
@@ -58,6 +48,22 @@
gdb_load ${binfile}
+# Decide if we should test SREC, IHEX and TEKHEX formats.
+if {![istarget "alpha*-*-*"]} then {
+ # Check the size of a function pointer and of a data pointer. If
+ # both are different from 4-bytes, we probably have 64-bit
+ # addresses that are not supported by SREC, IHEX and TEKHEX. We
+ # skip those tests then.
+ # If we error out below, we use the defaults (8 bytes) and skip
+ # the SREC, IHEX and TEKHEX tests just to be safe.
+
+ set sizeof_function_ptr [get_sizeof "void (*)(void)" 8]
+ set sizeof_data_ptr [get_sizeof "void *" 8]
+ if {${sizeof_function_ptr} != 4 && ${sizeof_data_ptr} != 4} then {
+ set is64bitonly "yes"
+ }
+}
+
# Clean up any stale output files from previous test runs
remote_exec build "rm -f intarr1.bin intarr1b.bin intarr1.ihex intarr1.srec intarr1.tekhex intarr2.bin intarr2b.bin intarr2.ihex intarr2.srec intarr2.tekhex intstr1.bin intstr1b.bin intstr1.ihex intstr1.srec intstr1.tekhex intstr2.bin intstr2b.bin intstr2.ihex intstr2.srec intstr2.tekhex intarr3.srec"
next prev parent reply other threads:[~2013-07-02 18:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 16:24 Luis Machado
2013-07-02 14:37 ` Yao Qi
2013-07-02 14:45 ` Luis Machado
2013-07-03 0:03 ` Yao Qi
2013-07-02 16:47 ` Tom Tromey
2013-07-02 16:51 ` Luis Machado
2013-07-02 17:19 ` Stan Shebs
2013-07-02 18:10 ` Tom Tromey
2013-07-02 18:50 ` Luis Machado [this message]
2013-07-02 20:55 ` Tom Tromey
2013-07-03 15:05 ` Pedro Alves
2013-07-03 19:23 ` Luis Machado
2013-07-03 19:26 ` Pedro Alves
2013-07-03 20:19 ` Luis Machado
2013-07-04 8:11 ` Pedro Alves
2013-07-06 2:41 ` Luis Machado
2013-07-03 20:35 ` Maciej W. Rozycki
2013-07-03 20:54 ` Luis Machado
2013-07-03 21:08 ` Maciej W. Rozycki
2013-07-04 11:48 ` Luis Machado
2013-07-04 12:13 ` Maciej W. Rozycki
2013-07-04 12:21 ` Luis Machado
2013-07-04 13:22 ` Ulrich Weigand
2013-07-04 13:24 ` Luis Machado
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=51D32100.4000901@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=stanshebs@earthlink.net \
--cc=tromey@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