* gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir}
@ 2002-04-15 22:11 Daniel Jacobowitz
2002-04-16 7:31 ` Elena Zannoni
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-04-15 22:11 UTC (permalink / raw)
To: Elena Zannoni, gdb-patches
${srcdir} in the testsuite is for gdb/testsuite/; but a symbolic link in
gdb.asm needs to have an extra '..' if it's an absolute path. I always
configure as '../srcdir/configure', so this breaks for me.
Do you think creating the link in objdir/gdb/testsuite/ instead would be a
good solution? I can't think of another portable one.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir}
2002-04-15 22:11 gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir} Daniel Jacobowitz
@ 2002-04-16 7:31 ` Elena Zannoni
2002-04-16 9:56 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Elena Zannoni @ 2002-04-16 7:31 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
Daniel Jacobowitz writes:
> ${srcdir} in the testsuite is for gdb/testsuite/; but a symbolic link in
> gdb.asm needs to have an extra '..' if it's an absolute path. I always
> configure as '../srcdir/configure', so this breaks for me.
>
Ahhh, relative paths! I gave up on those. Sometimes I was seeing odd
testsuite failures due to that. Anyway....
> Do you think creating the link in objdir/gdb/testsuite/ instead would be a
> good solution? I can't think of another portable one.
>
How about the following. Somebody reminded me that there is no
technical reason to use a symlink at all. I tried with relative and
absolute paths, and seems to work fine. Can you try it?
Other files (twice.exp, selftest.exp, list.exp) use this technique,
but copy files in the "testsuite" directory as opposed to
testsuite/gdb.base. (maybe these can be fixed too).
Elena
Index: asm-source.exp
===================================================================
RCS file: /cvs/uberbaum/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.21
diff -u -p -r1.21 asm-source.exp
--- asm-source.exp 8 Apr 2002 00:01:06 -0000 1.21
+++ asm-source.exp 16 Apr 2002 14:27:16 -0000
@@ -87,9 +87,7 @@ set binfile ${objdir}/${subdir}/${testfi
set src1 ${srcdir}/${subdir}/asmsrc1.s
set src2 ${srcdir}/${subdir}/asmsrc2.s
-set insn_file ${srcdir}/${subdir}/${asm-arch}.inc
-remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
-remote_exec build "ln -s ${insn_file} ${objdir}/${subdir}/arch.inc"
+remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc
if { "${asm-flags}" == "" } {
#set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}"
@@ -278,3 +276,4 @@ gdb_test "print staticvar" ".* = 5" "loo
gdb_test "disassem foostatic" ".*<foostatic>:.*End of assembler dump." \
"look at static function"
+remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir}
2002-04-16 7:31 ` Elena Zannoni
@ 2002-04-16 9:56 ` Daniel Jacobowitz
2002-04-18 18:16 ` Michael Snyder
2002-04-19 9:06 ` Elena Zannoni
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-04-16 9:56 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches
On Tue, Apr 16, 2002 at 10:31:32AM -0400, Elena Zannoni wrote:
> Daniel Jacobowitz writes:
> > ${srcdir} in the testsuite is for gdb/testsuite/; but a symbolic link in
> > gdb.asm needs to have an extra '..' if it's an absolute path. I always
> > configure as '../srcdir/configure', so this breaks for me.
> >
>
> Ahhh, relative paths! I gave up on those. Sometimes I was seeing odd
> testsuite failures due to that. Anyway....
>
> > Do you think creating the link in objdir/gdb/testsuite/ instead would be a
> > good solution? I can't think of another portable one.
> >
>
> How about the following. Somebody reminded me that there is no
> technical reason to use a symlink at all. I tried with relative and
> absolute paths, and seems to work fine. Can you try it?
It works, with one caveat:
> Index: asm-source.exp
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/testsuite/gdb.asm/asm-source.exp,v
> retrieving revision 1.21
> diff -u -p -r1.21 asm-source.exp
> --- asm-source.exp 8 Apr 2002 00:01:06 -0000 1.21
> +++ asm-source.exp 16 Apr 2002 14:27:16 -0000
> @@ -87,9 +87,7 @@ set binfile ${objdir}/${subdir}/${testfi
> set src1 ${srcdir}/${subdir}/asmsrc1.s
> set src2 ${srcdir}/${subdir}/asmsrc2.s
>
> -set insn_file ${srcdir}/${subdir}/${asm-arch}.inc
> -remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
Please don't delete this line. If you remote_download onto a dangling
symlink, you get an error. I don't know what happens if you remote
download onto a normal symlink, but it runs a risk of clobbering
something in ${srcdir}.
> -remote_exec build "ln -s ${insn_file} ${objdir}/${subdir}/arch.inc"
> +remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc
>
> if { "${asm-flags}" == "" } {
> #set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}"
> @@ -278,3 +276,4 @@ gdb_test "print staticvar" ".* = 5" "loo
> gdb_test "disassem foostatic" ".*<foostatic>:.*End of assembler dump." \
> "look at static function"
>
> +remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
>
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir}
2002-04-16 9:56 ` Daniel Jacobowitz
@ 2002-04-18 18:16 ` Michael Snyder
2002-04-19 9:06 ` Elena Zannoni
1 sibling, 0 replies; 6+ messages in thread
From: Michael Snyder @ 2002-04-18 18:16 UTC (permalink / raw)
To: Daniel Jacobowitz, gdb-patches, ezannoni
Daniel Jacobowitz wrote:
>
> On Tue, Apr 16, 2002 at 10:31:32AM -0400, Elena Zannoni wrote:
> > How about the following. Somebody reminded me that there is no
> > technical reason to use a symlink at all. I tried with relative and
> > absolute paths, and seems to work fine. Can you try it?
>
> It works, with one caveat:
So who'll check it in? [this is approval]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir}
2002-04-16 9:56 ` Daniel Jacobowitz
2002-04-18 18:16 ` Michael Snyder
@ 2002-04-19 9:06 ` Elena Zannoni
2002-04-19 9:18 ` Daniel Jacobowitz
1 sibling, 1 reply; 6+ messages in thread
From: Elena Zannoni @ 2002-04-19 9:06 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Elena Zannoni, gdb-patches
Daniel Jacobowitz writes:
> On Tue, Apr 16, 2002 at 10:31:32AM -0400, Elena Zannoni wrote:
> >
> > -set insn_file ${srcdir}/${subdir}/${asm-arch}.inc
> > -remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
>
> Please don't delete this line. If you remote_download onto a dangling
> symlink, you get an error. I don't know what happens if you remote
> download onto a normal symlink, but it runs a risk of clobbering
> something in ${srcdir}.
>
Actually there would be no symlink at all after this patch.
But I'll leave the line in anyway, just in case.
This is what I checked in:
2002-04-19 Elena Zannoni <ezannoni@redhat.com>
* gdb.asm/asm-source.exp: Don't use a symlink, just copy the
instruction file directly into the build tree. Clean up at end of
test.
Index: asm-source.exp
===================================================================
RCS file: /cvs/uberbaum/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.21
diff -u -p -r1.21 asm-source.exp
--- asm-source.exp 8 Apr 2002 00:01:06 -0000 1.21
+++ asm-source.exp 19 Apr 2002 16:05:10 -0000
@@ -87,9 +87,8 @@ set binfile ${objdir}/${subdir}/${testfi
set src1 ${srcdir}/${subdir}/asmsrc1.s
set src2 ${srcdir}/${subdir}/asmsrc2.s
-set insn_file ${srcdir}/${subdir}/${asm-arch}.inc
-remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
-remote_exec build "ln -s ${insn_file} ${objdir}/${subdir}/arch.inc"
+remote_exec build "rm -f ${subdir}/arch.inc"
+remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc
if { "${asm-flags}" == "" } {
#set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}"
@@ -278,3 +277,4 @@ gdb_test "print staticvar" ".* = 5" "loo
gdb_test "disassem foostatic" ".*<foostatic>:.*End of assembler dump." \
"look at static function"
+remote_exec build "rm -f ${subdir}/arch.inc"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir}
2002-04-19 9:06 ` Elena Zannoni
@ 2002-04-19 9:18 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-04-19 9:18 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches
On Fri, Apr 19, 2002 at 12:06:24PM -0400, Elena Zannoni wrote:
> Daniel Jacobowitz writes:
> > On Tue, Apr 16, 2002 at 10:31:32AM -0400, Elena Zannoni wrote:
>
> > >
> > > -set insn_file ${srcdir}/${subdir}/${asm-arch}.inc
> > > -remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
> >
> > Please don't delete this line. If you remote_download onto a dangling
> > symlink, you get an error. I don't know what happens if you remote
> > download onto a normal symlink, but it runs a risk of clobbering
> > something in ${srcdir}.
> >
>
> Actually there would be no symlink at all after this patch.
> But I'll leave the line in anyway, just in case.
Thanks. There will be no symlink unless you're using an object
directory that predates the patch, which I was when I tried it.
> This is what I checked in:
>
> 2002-04-19 Elena Zannoni <ezannoni@redhat.com>
>
> * gdb.asm/asm-source.exp: Don't use a symlink, just copy the
> instruction file directly into the build tree. Clean up at end of
> test.
Thanks!
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-04-19 16:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-15 22:11 gdb.asm/asm-source.exp creation of arch.inc doesn't work for relative ${srcdir} Daniel Jacobowitz
2002-04-16 7:31 ` Elena Zannoni
2002-04-16 9:56 ` Daniel Jacobowitz
2002-04-18 18:16 ` Michael Snyder
2002-04-19 9:06 ` Elena Zannoni
2002-04-19 9:18 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox