* [rfc]: Fix gdb.base/gcore.exp
@ 2007-05-03 17:09 Markus Deuling
2007-05-08 18:27 ` Ulrich Weigand
2007-05-11 17:56 ` Daniel Jacobowitz
0 siblings, 2 replies; 6+ messages in thread
From: Markus Deuling @ 2007-05-03 17:09 UTC (permalink / raw)
To: GDB Patches
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
Hi,
gdb.base/gcore.exp quits with a tcl error because of an uninitialized variable.
This patch initializes it in every case.
Is this ok ?
ChangeLog:
* gdb.base/gcore.exp: Initialize variable
core_supported.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
[-- Attachment #2: diff-fix-gcore-exp --]
[-- Type: text/plain, Size: 534 bytes --]
diff -urN src/gdb/testsuite/gdb.base/gcore.exp dev/gdb/testsuite/gdb.base/gcore.exp
--- src/gdb/testsuite/gdb.base/gcore.exp 2007-01-09 18:59:11.000000000 +0100
+++ dev/gdb/testsuite/gdb.base/gcore.exp 2007-05-03 19:04:07.000000000 +0200
@@ -108,6 +108,7 @@
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
+set core_supported 0
gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
"save a corefile" \
{
@@ -123,7 +124,6 @@
}
}
-global core_supported
if {!$core_supported} {
return -1
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rfc]: Fix gdb.base/gcore.exp
2007-05-03 17:09 [rfc]: Fix gdb.base/gcore.exp Markus Deuling
@ 2007-05-08 18:27 ` Ulrich Weigand
2007-05-08 18:37 ` Daniel Jacobowitz
2007-05-11 17:56 ` Daniel Jacobowitz
1 sibling, 1 reply; 6+ messages in thread
From: Ulrich Weigand @ 2007-05-08 18:27 UTC (permalink / raw)
To: Markus Deuling; +Cc: GDB Patches
Markus Deuling wrote:
> gdb.base/gcore.exp quits with a tcl error because of an uninitialized variable.
> This patch initializes it in every case.
The test case currently has:
gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
"save a corefile" \
{
-re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
pass "save a corefile"
global core_supported
set core_supported 1
}
-re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
unsupported "save a corefile"
global core_supported
set core_supported 0
}
}
What output do you get that runs into neither of the two
tested patterns?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rfc]: Fix gdb.base/gcore.exp
2007-05-08 18:27 ` Ulrich Weigand
@ 2007-05-08 18:37 ` Daniel Jacobowitz
2007-05-09 11:43 ` Markus Deuling
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-05-08 18:37 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Markus Deuling, GDB Patches
On Tue, May 08, 2007 at 08:26:54PM +0200, Ulrich Weigand wrote:
> What output do you get that runs into neither of the two
> tested patterns?
FWIW, while Alan had core files broken because of the
segment-in-section change, I encountered the same TCL error.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rfc]: Fix gdb.base/gcore.exp
2007-05-08 18:37 ` Daniel Jacobowitz
@ 2007-05-09 11:43 ` Markus Deuling
0 siblings, 0 replies; 6+ messages in thread
From: Markus Deuling @ 2007-05-09 11:43 UTC (permalink / raw)
To: Ulrich Weigand, Daniel Jacobowitz, GDB Patches
Daniel Jacobowitz wrote:
> On Tue, May 08, 2007 at 08:26:54PM +0200, Ulrich Weigand wrote:
>> What output do you get that runs into neither of the two
>> tested patterns?
>
> FWIW, while Alan had core files broken because of the
> segment-in-section change, I encountered the same TCL error.
>
I cannot reproduce it with current head :-( There was an error in
creating that core file.
For my opinion that variable should be initialized in every case. The testcase
should return a FAIL if GDB's output doesn't match the reg exp but not exit with an error.
<snip>
global core_supported
if {!$core_supported} {
return -1
}
</snip>
However, this testcase runs without error now. Thanks for your effort.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rfc]: Fix gdb.base/gcore.exp
2007-05-03 17:09 [rfc]: Fix gdb.base/gcore.exp Markus Deuling
2007-05-08 18:27 ` Ulrich Weigand
@ 2007-05-11 17:56 ` Daniel Jacobowitz
2007-05-14 21:07 ` Ulrich Weigand
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-05-11 17:56 UTC (permalink / raw)
To: Markus Deuling; +Cc: GDB Patches
On Thu, May 03, 2007 at 07:08:23PM +0200, Markus Deuling wrote:
> Hi,
>
> gdb.base/gcore.exp quits with a tcl error because of an uninitialized variable.
> This patch initializes it in every case.
>
> Is this ok ?
>
> ChangeLog:
>
> * gdb.base/gcore.exp: Initialize variable
> core_supported.
Yes, this is OK. (No need to wrap in the middle of the log entry -
you've got plenty of columns :-)
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rfc]: Fix gdb.base/gcore.exp
2007-05-11 17:56 ` Daniel Jacobowitz
@ 2007-05-14 21:07 ` Ulrich Weigand
0 siblings, 0 replies; 6+ messages in thread
From: Ulrich Weigand @ 2007-05-14 21:07 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Markus Deuling, GDB Patches
Daniel Jacobowitz wrote:
> On Thu, May 03, 2007 at 07:08:23PM +0200, Markus Deuling wrote:
> >
> > * gdb.base/gcore.exp: Initialize variable
> > core_supported.
>
> Yes, this is OK. (No need to wrap in the middle of the log entry -
> you've got plenty of columns :-)
I've committed this now, thanks.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-14 21:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-03 17:09 [rfc]: Fix gdb.base/gcore.exp Markus Deuling
2007-05-08 18:27 ` Ulrich Weigand
2007-05-08 18:37 ` Daniel Jacobowitz
2007-05-09 11:43 ` Markus Deuling
2007-05-11 17:56 ` Daniel Jacobowitz
2007-05-14 21:07 ` Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox