Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: Fix shreloc.exp test driver to pass additional flags when linking
@ 2003-11-07 10:48 Nick Clifton
  2003-11-07 14:31 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2003-11-07 10:48 UTC (permalink / raw)
  To: gdb-patches; +Cc: nickc

Hi Guys,

  May I have permission to apply the following patch please ?

  It fixes the shreloc.exp testsuite driver code so that when it is
  linking together the shared object files that it has created, it
  passes the -shared switch on to the linker.  This fixes a seg fault
  when the testsuite was being run on a old arm-elf toolchain.

Cheers
        Nick

2003-11-07  Nick Clifton  <nickc@redhat.com>

	* gdb.base/shreloc.exp: Pass $additional_flags to gdb_compile
	when linking together the shared object files.

Index: gdb/testsuite/gdb.base/shreloc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shreloc.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 shreloc.exp
*** gdb/testsuite/gdb.base/shreloc.exp	9 Jun 2003 21:23:53 -0000	1.1
--- gdb/testsuite/gdb.base/shreloc.exp	7 Nov 2003 10:44:07 -0000
*************** foreach module [list "shreloc1" "shreloc
*** 56,62 ****
      }
  }
  
! if {[gdb_compile [list "${workdir}/shreloc.o" "${workdir}/shreloc1.dll" "${workdir}/shreloc2.dll"] "${workdir}/shreloc" executable debug] != ""} {
      untested "Couldn't link shreloc executable"
      return -1
  }
--- 56,62 ----
      }
  }
  
! if {[gdb_compile [list "${workdir}/shreloc.o" "${workdir}/shreloc1.dll" "${workdir}/shreloc2.dll"] "${workdir}/shreloc" executable [list debug $additional_flags]] != ""} {
      untested "Couldn't link shreloc executable"
      return -1
  }
        


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

* Re: RFA: Fix shreloc.exp test driver to pass additional flags when linking
  2003-11-07 10:48 RFA: Fix shreloc.exp test driver to pass additional flags when linking Nick Clifton
@ 2003-11-07 14:31 ` Daniel Jacobowitz
       [not found]   ` <m3ptg4jftp.fsf@redhat.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-11-07 14:31 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gdb-patches

On Fri, Nov 07, 2003 at 10:48:31AM +0000, Nick Clifton wrote:
> Hi Guys,
> 
>   May I have permission to apply the following patch please ?
> 
>   It fixes the shreloc.exp testsuite driver code so that when it is
>   linking together the shared object files that it has created, it
>   passes the -shared switch on to the linker.  This fixes a seg fault
>   when the testsuite was being run on a old arm-elf toolchain.

No.  shreloc is supposed to be an executable, not a shared library.

An arm-elf toolchain doesn't have shared library support, does it? 
Then the test should probably be disabled.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: RFA: Fix shreloc.exp test driver to pass additional flags when linking
       [not found]     ` <20031107164045.GA32117@nevyn.them.org>
@ 2003-11-10 13:08       ` Nick Clifton
  2003-11-11 17:06         ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2003-11-10 13:08 UTC (permalink / raw)
  To: gdb-patches; +Cc: Daniel Jacobowitz

Hi Guys,

> Daniel Jacobowitz <drow@mvista.com> writes:

>> On Fri, Nov 07, 2003 at 04:36:50PM +0000, Nick Clifton wrote:
>> 
>> > An arm-elf toolchain doesn't have shared library support, does it? 
>> > Then the test should probably be disabled.
>> 
>> Is there an official way to do this.  I could create a new dejagnu
>> variable along the lines of:
>> 
>>   set_board_info gdb,no_shared_libs 1
>> 
>> and then this could be tested in shreloc.exp ?
>
> There's no particular way to do it - that would work or just
> disabling the test for [istarget *-elf] || [istarget *-coff] would
> work too.

Well that is certainly simpler.  In which case, please may I have
approval to check in this patch ?

Cheers
        Nick

gdb/testsuite/ChangeLog
2003-11-10  Nick Clifton  <nickc@redhat.com>

	* gdb.base/shreloc.exp: Do not run for targets which do not
	support shared objects.

Index: gdb/testsuite/gdb.base/shreloc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shreloc.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 shreloc.exp
*** gdb/testsuite/gdb.base/shreloc.exp	9 Jun 2003 21:23:53 -0000	1.1
--- gdb/testsuite/gdb.base/shreloc.exp	10 Nov 2003 13:05:18 -0000
***************
*** 23,28 ****
--- 23,33 ----
  # them gets relocated at load-time. Check that gdb gets the right
  # values for the debugging and minimal symbols.
  
+ if {[istarget *-elf*] || [istarget *-coff] || [istarget *-aout]} then {
+     verbose "test skipped - shared object files not supported by this target."
+     return 0
+ }
+ 
  if $tracelevel then {
      strace $tracelevel
  }


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

* Re: RFA: Fix shreloc.exp test driver to pass additional flags when linking
  2003-11-10 13:08       ` Nick Clifton
@ 2003-11-11 17:06         ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-11-11 17:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gdb-patches

On Mon, Nov 10, 2003 at 01:08:01PM +0000, Nick Clifton wrote:
> Hi Guys,
> 
> > Daniel Jacobowitz <drow@mvista.com> writes:
> 
> >> On Fri, Nov 07, 2003 at 04:36:50PM +0000, Nick Clifton wrote:
> >> 
> >> > An arm-elf toolchain doesn't have shared library support, does it? 
> >> > Then the test should probably be disabled.
> >> 
> >> Is there an official way to do this.  I could create a new dejagnu
> >> variable along the lines of:
> >> 
> >>   set_board_info gdb,no_shared_libs 1
> >> 
> >> and then this could be tested in shreloc.exp ?
> >
> > There's no particular way to do it - that would work or just
> > disabling the test for [istarget *-elf] || [istarget *-coff] would
> > work too.
> 
> Well that is certainly simpler.  In which case, please may I have
> approval to check in this patch ?

This is fine, thank you!

> 
> Cheers
>         Nick
> 
> gdb/testsuite/ChangeLog
> 2003-11-10  Nick Clifton  <nickc@redhat.com>
> 
> 	* gdb.base/shreloc.exp: Do not run for targets which do not
> 	support shared objects.
> 
> Index: gdb/testsuite/gdb.base/shreloc.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shreloc.exp,v
> retrieving revision 1.1
> diff -c -3 -p -r1.1 shreloc.exp
> *** gdb/testsuite/gdb.base/shreloc.exp	9 Jun 2003 21:23:53 -0000	1.1
> --- gdb/testsuite/gdb.base/shreloc.exp	10 Nov 2003 13:05:18 -0000
> ***************
> *** 23,28 ****
> --- 23,33 ----
>   # them gets relocated at load-time. Check that gdb gets the right
>   # values for the debugging and minimal symbols.
>   
> + if {[istarget *-elf*] || [istarget *-coff] || [istarget *-aout]} then {
> +     verbose "test skipped - shared object files not supported by this target."
> +     return 0
> + }
> + 
>   if $tracelevel then {
>       strace $tracelevel
>   }
> 
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

end of thread, other threads:[~2003-11-11 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-07 10:48 RFA: Fix shreloc.exp test driver to pass additional flags when linking Nick Clifton
2003-11-07 14:31 ` Daniel Jacobowitz
     [not found]   ` <m3ptg4jftp.fsf@redhat.com>
     [not found]     ` <20031107164045.GA32117@nevyn.them.org>
2003-11-10 13:08       ` Nick Clifton
2003-11-11 17:06         ` Daniel Jacobowitz

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