Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Support Fortran common blocks with addresses >INT_MAX.
@ 2012-03-08 14:31 Chris January
  2012-03-09 19:39 ` Joel Brobecker
  0 siblings, 1 reply; 9+ messages in thread
From: Chris January @ 2012-03-08 14:31 UTC (permalink / raw)
  To: gdb-patches

The address of a Fortran common block may be >INT_MAX. fix_common_block
should be using CORE_ADDR, not int.

2012-03-08  Chris January  <chris.january@allinea.com>

        * stabsread.c (fix_common_block): Change type of valu argument
        to CORE_ADDR.
---
Index: gdb/stabsread.c
===================================================================
--- gdb/stabsread.c.orig	2011-02-17 11:14:42.713081030 +0000
+++ gdb/stabsread.c	2011-02-17 11:15:14.414327296 +0000
@@ -104,7 +104,7 @@ static void
 patch_block_stabs (struct pending *, struct pending_stabs *,
 		   struct objfile *);
 
-static void fix_common_block (struct symbol *, int);
+static void fix_common_block (struct symbol *, CORE_ADDR);
 
 static int read_type_number (char **, int *);
 
@@ -4805,7 +4805,7 @@ common_block_end (struct objfile *objfil
    the common block name).  */
 
 static void
-fix_common_block (struct symbol *sym, int valu)
+fix_common_block (struct symbol *sym, CORE_ADDR valu)
 {
   struct pending *next = (struct pending *) SYMBOL_TYPE (sym);
 



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

* Re: [PATCH] Support Fortran common blocks with addresses >INT_MAX.
  2012-03-08 14:31 [PATCH] Support Fortran common blocks with addresses >INT_MAX Chris January
@ 2012-03-09 19:39 ` Joel Brobecker
  2012-03-12  8:45   ` Chris January
  0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2012-03-09 19:39 UTC (permalink / raw)
  To: Chris January; +Cc: gdb-patches

Chris,

> The address of a Fortran common block may be >INT_MAX. fix_common_block
> should be using CORE_ADDR, not int.
> 
> 2012-03-08  Chris January  <chris.january@allinea.com>
> 
>         * stabsread.c (fix_common_block): Change type of valu argument
>         to CORE_ADDR.

This change looks correct to me too.  Did you run the testsuite to
validate the change, by any chance?

Do you have copyright assignment papers on file with the FSF?  If not,
this change is sufficiently small that we can accept it, as well as
your other contribution ("Add another way of setting up [...]").

If you are planning on making other contributions in the future,
we should really get you started on the assignment process - contact
me privately if you'd like to do so.

-- 
Joel


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

* Re: [PATCH] Support Fortran common blocks with addresses >INT_MAX.
  2012-03-09 19:39 ` Joel Brobecker
@ 2012-03-12  8:45   ` Chris January
  2012-03-12 15:30     ` Joel Brobecker
  2012-03-12 19:28     ` Tom Tromey
  0 siblings, 2 replies; 9+ messages in thread
From: Chris January @ 2012-03-12  8:45 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Fri, 2012-03-09 at 11:39 -0800, Joel Brobecker wrote:
> > The address of a Fortran common block may be >INT_MAX. fix_common_block
> > should be using CORE_ADDR, not int.
> > 
> > 2012-03-08  Chris January  <chris.january@allinea.com>
> > 
> >         * stabsread.c (fix_common_block): Change type of valu argument
> >         to CORE_ADDR.
> 
> This change looks correct to me too.  Did you run the testsuite to
> validate the change, by any chance?

No, although there aren't any test cases in testsuite/gdb.fortran that
use a common block anyway.

> Do you have copyright assignment papers on file with the FSF?  If not,
> this change is sufficiently small that we can accept it, as well as
> your other contribution ("Add another way of setting up [...]").

Yes, we have a company-wide assignment.

Chris



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

* Re: [PATCH] Support Fortran common blocks with addresses >INT_MAX.
  2012-03-12  8:45   ` Chris January
@ 2012-03-12 15:30     ` Joel Brobecker
  2012-03-12 19:30       ` Tom Tromey
  2012-03-13 15:17       ` Chris January
  2012-03-12 19:28     ` Tom Tromey
  1 sibling, 2 replies; 9+ messages in thread
From: Joel Brobecker @ 2012-03-12 15:30 UTC (permalink / raw)
  To: Chris January; +Cc: gdb-patches

> > > 2012-03-08  Chris January  <chris.january@allinea.com>
> > > 
> > >         * stabsread.c (fix_common_block): Change type of valu argument
> > >         to CORE_ADDR.
> > 
> > This change looks correct to me too.  Did you run the testsuite to
> > validate the change, by any chance?
> 
> No, although there aren't any test cases in testsuite/gdb.fortran that
> use a common block anyway.

The problem is that this potentially affects more than just Fortran
programs using common blocks.

Would you have a GNU/Linux box available? You could test your change
a little differently, by running the testsuite with -gstabs+. I think
the following command should work:

    % make check RUNTESTFLAGS="--target_board % unix/gdb:debug_flags=-gstabs+"

The second issue that this raises is that it would be nice to have
one such testcase to detect future changes that might break this.
But given that this is stabs, and that stabs are on their last breath,
I am not going to insist on it this time around, especially if it is
going to take lots of time from you.

FYI: We, at AdaCore, switch to DWARF on AIX last year. We had to move
to GNU ld for that. One thing I have to say, we're not sorry to be rid
of stabs.

> > Do you have copyright assignment papers on file with the FSF?  If not,
> > this change is sufficiently small that we can accept it, as well as
> > your other contribution ("Add another way of setting up [...]").
> 
> Yes, we have a company-wide assignment.

OK, found it! Thanks...

-- 
Joel


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

* Re: [PATCH] Support Fortran common blocks with addresses >INT_MAX.
  2012-03-12  8:45   ` Chris January
  2012-03-12 15:30     ` Joel Brobecker
@ 2012-03-12 19:28     ` Tom Tromey
  1 sibling, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2012-03-12 19:28 UTC (permalink / raw)
  To: Chris January; +Cc: Joel Brobecker, gdb-patches

>>>>> "Chris" == Chris January <chris.january@allinea.com> writes:

Chris> Yes, we have a company-wide assignment.

Great.
Send me email off-list and I will hook you up with write-after-approval
permissions. 

Tom


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

* Re: [PATCH] Support Fortran common blocks with addresses >INT_MAX.
  2012-03-12 15:30     ` Joel Brobecker
@ 2012-03-12 19:30       ` Tom Tromey
  2012-03-13 15:17       ` Chris January
  1 sibling, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2012-03-12 19:30 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Chris January, gdb-patches

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> Would you have a GNU/Linux box available?

Anybody working on GDB can get an account on the GCC Compile Farm.
This has a variety of machines, some quite nice.

http://gcc.gnu.org/wiki/CompileFarm

Tom


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

* Re: [PATCH] Support Fortran common blocks with addresses >INT_MAX.
  2012-03-12 15:30     ` Joel Brobecker
  2012-03-12 19:30       ` Tom Tromey
@ 2012-03-13 15:17       ` Chris January
  2012-03-13 16:50         ` Joel Brobecker
  1 sibling, 1 reply; 9+ messages in thread
From: Chris January @ 2012-03-13 15:17 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Mon, 2012-03-12 at 08:30 -0700, Joel Brobecker wrote:
> > > > 2012-03-08  Chris January  <chris.january@allinea.com>
> > > > 
> > > >         * stabsread.c (fix_common_block): Change type of valu argument
> > > >         to CORE_ADDR.
> > > 
> > > This change looks correct to me too.  Did you run the testsuite to
> > > validate the change, by any chance?
> > 
> > No, although there aren't any test cases in testsuite/gdb.fortran that
> > use a common block anyway.
> 
> The problem is that this potentially affects more than just Fortran
> programs using common blocks.
> 
> Would you have a GNU/Linux box available? You could test your change
> a little differently, by running the testsuite with -gstabs+. I think
> the following command should work:
> 
>     % make check RUNTESTFLAGS="--target_board % unix/gdb:debug_flags=-gstabs+"

I ran the test suite on a GNU/Linux (SLES 10) PPC970 box. Four of the
tests have intermittent failures (before and after the patch), but
ignoring those there were no regressions.

Chris


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

* Re: [PATCH] Support Fortran common blocks with addresses >INT_MAX.
  2012-03-13 15:17       ` Chris January
@ 2012-03-13 16:50         ` Joel Brobecker
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2012-03-13 16:50 UTC (permalink / raw)
  To: Chris January; +Cc: gdb-patches

> On Mon, 2012-03-12 at 08:30 -0700, Joel Brobecker wrote:
> > > > > 2012-03-08  Chris January  <chris.january@allinea.com>
> > > > > 
> > > > >         * stabsread.c (fix_common_block): Change type of valu argument
> > > > >         to CORE_ADDR.
> I ran the test suite on a GNU/Linux (SLES 10) PPC970 box. Four of the
> tests have intermittent failures (before and after the patch), but
> ignoring those there were no regressions.

Thanks, Chris. This patch is also in, now.

-- 
Joel


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

* [PATCH] Support Fortran common blocks with addresses >INT_MAX.
@ 2012-03-08 14:31 Chris January
  0 siblings, 0 replies; 9+ messages in thread
From: Chris January @ 2012-03-08 14:31 UTC (permalink / raw)
  To: gdb-patches

The address of a Fortran common block may be >INT_MAX. fix_common_block
should be using CORE_ADDR, not int.

2012-03-08  Chris January  <chris.january@allinea.com>

        * stabsread.c (fix_common_block): Change type of valu argument
        to CORE_ADDR.
---
Index: gdb/stabsread.c
===================================================================
--- gdb/stabsread.c.orig	2011-02-17 11:14:42.713081030 +0000
+++ gdb/stabsread.c	2011-02-17 11:15:14.414327296 +0000
@@ -104,7 +104,7 @@ static void
 patch_block_stabs (struct pending *, struct pending_stabs *,
 		   struct objfile *);
 
-static void fix_common_block (struct symbol *, int);
+static void fix_common_block (struct symbol *, CORE_ADDR);
 
 static int read_type_number (char **, int *);
 
@@ -4805,7 +4805,7 @@ common_block_end (struct objfile *objfil
    the common block name).  */
 
 static void
-fix_common_block (struct symbol *sym, int valu)
+fix_common_block (struct symbol *sym, CORE_ADDR valu)
 {
   struct pending *next = (struct pending *) SYMBOL_TYPE (sym);
 




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

end of thread, other threads:[~2012-03-13 16:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08 14:31 [PATCH] Support Fortran common blocks with addresses >INT_MAX Chris January
2012-03-09 19:39 ` Joel Brobecker
2012-03-12  8:45   ` Chris January
2012-03-12 15:30     ` Joel Brobecker
2012-03-12 19:30       ` Tom Tromey
2012-03-13 15:17       ` Chris January
2012-03-13 16:50         ` Joel Brobecker
2012-03-12 19:28     ` Tom Tromey
  -- strict thread matches above, loose matches on Subject: below --
2012-03-08 14:31 Chris January

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox