This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/testcase] fix gdb.base/relocate.c


On Mon, Jul 07, 2003 at 10:58:30PM -0400, Daniel Jacobowitz wrote:
> On Tue, Jul 08, 2003 at 11:56:07AM +0900, Kei Sakamoto wrote:
> > 2003-07-08    Kei Sakamoto  <sakamoto.kei@renesas.com>
> > 
> >  * gdb.base/relocate.c : Add a dummy array to make global_bar
> >         and function_bar have different addresses.
> 
> Ugh, this is OK, since the test can only reliably specify an offset for
> .text.

I've checked this in, with updated commentary.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-07-24  Daniel Jacobowitz  <drow@mvista.com>

	From Kei Sakamoto <sakamoto.kei@renesas.com>:
	* gdb.base/relocate.c (dummy): New padding array.

Index: gdb.base/relocate.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/relocate.c,v
retrieving revision 1.1
diff -u -p -r1.1 relocate.c
--- gdb.base/relocate.c	5 Apr 2002 02:45:48 -0000	1.1
+++ gdb.base/relocate.c	24 Jul 2003 18:44:36 -0000
@@ -1,6 +1,10 @@
 static int static_foo = 1;
 static int static_bar = 2;
 
+/* This padding is just for the benefit of the test harness.  It
+   causes the globals to have different addresses than the functions.  */
+int dummy[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
 int global_foo = 3;
 int global_bar = 4;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]