* [commit] Recover from struct-return internal errors
@ 2003-11-20 18:07 Andrew Cagney
2003-11-20 18:32 ` David Carlton
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-11-20 18:07 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
I've committed the attached. It tries to get the structs.exp test out
of a hole that that the amd64 GDB appears to be digging for it:
> (gdb) PASS: gdb.base/structs.exp: ptype foo1; structs-tc
> p/c fun1()
> /home/cygnus/cagney/GDB/src/gdb/x86-64-tdep.c:438: internal-error: classify_argument: unknown argument type
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n) FAIL: gdb.base/structs.exp: p/c fun<n>(); call 1 structs-tc (GDB internal error)
> n
> /home/cygnus/cagney/GDB/src/gdb/x86-64-tdep.c:438: internal-error: classify_argument: unknown argument type
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Create a core file of GDB? (y or n) n
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2615 bytes --]
2003-11-20 Andrew Cagney <cagney@redhat.com>
* gdb.base/structs.exp: Handle and recover from internal errors.
Replace "foo${n}" with "foo<n>" in test messages.
Index: gdb.base/structs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v
retrieving revision 1.8
diff -u -r1.8 structs.exp
--- gdb.base/structs.exp 20 Nov 2003 17:11:55 -0000 1.8
+++ gdb.base/structs.exp 20 Nov 2003 18:01:41 -0000
@@ -321,11 +321,22 @@
-re "L[expr ${n} + 1] *= fun[expr ${n} + 1].*${gdb_prompt} $" {
pass "${test}"
}
+ -re "A problem internal to GDB has been detected" {
+ fail "${test} (GDB internal error 2)"
+ gdb_internal_error_resync
+ }
+ -re "${gdb_prompt} $" {
+ fail "${test} (wrong line info)"
+ }
timeout {
fail "${test} (timeout 2)"
}
}
}
+ -re "A problem internal to GDB has been detected" {
+ fail "${test} (GDB internal error 1)"
+ gdb_internal_error_resync
+ }
-re "${gdb_prompt} $" {
fail "${test} (no query)"
}
@@ -364,6 +375,10 @@
fail "${test}"
}
}
+ -re "A problem internal to GDB has been detected" {
+ fail "${test} (GDB internal error)"
+ gdb_internal_error_resync
+ }
-re "${gdb_prompt} $" {
# Garbage returned, garbage printed
fail "${test}"
@@ -395,7 +410,7 @@
# Finish the function, set 'finish_value_unknown" to non-empty if the
# return-value was not found.
send_gdb "finish\n"
- set test "finish foo${n}; ${tests}"
+ set test "finish foo<n>; ${tests}"
set finish_value_unknown 0
gdb_expect {
-re "Value returned is .*${gdb_prompt} $" {
@@ -406,6 +421,10 @@
set finish_value_unknown 1
pass "${test}"
}
+ -re "A problem internal to GDB has been detected" {
+ fail "${test} (GDB internal error)"
+ gdb_internal_error_resync
+ }
-re ".*${gdb_prompt} $" {
# Garbage returned
fail "${test}"
@@ -419,7 +438,7 @@
# "p/c". If no return value was found, the 'Z' from the previous
# check that the variable was cleared, is printed.
send_gdb "p/c\n"
- set test "value foo${n} finished; ${tests}"
+ set test "value foo<n> finished; ${tests}"
setup_kfails structs-*tld* i686-*-* gdb/1447
gdb_expect {
-re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
@@ -440,6 +459,10 @@
# know the location of the return-value.
fail "${test}"
}
+ }
+ -re "A problem internal to GDB has been detected" {
+ fail "${test} (GDB internal error)"
+ gdb_internal_error_resync
}
-re ".*${gdb_prompt} $" {
# Garbage returned
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [commit] Recover from struct-return internal errors
2003-11-20 18:07 [commit] Recover from struct-return internal errors Andrew Cagney
@ 2003-11-20 18:32 ` David Carlton
2003-11-20 18:44 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: David Carlton @ 2003-11-20 18:32 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Thu, 20 Nov 2003 13:07:18 -0500, Andrew Cagney <ac131313@redhat.com> said:
> + -re "A problem internal to GDB has been detected" {
> + fail "${test} (GDB internal error 1)"
> + gdb_internal_error_resync
> + }
Could you get rid of some of these by using gdb_test_multiple instead
of send_gdb/gdb_expect? I haven't looked at structs.exp in detail, so
I don't have any idea how possible that might be.
David Carlton
carlton@kealia.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [commit] Recover from struct-return internal errors
2003-11-20 18:32 ` David Carlton
@ 2003-11-20 18:44 ` Andrew Cagney
2003-11-20 18:50 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-11-20 18:44 UTC (permalink / raw)
To: David Carlton; +Cc: gdb-patches
> On Thu, 20 Nov 2003 13:07:18 -0500, Andrew Cagney <ac131313@redhat.com> said:
>
>
>> + -re "A problem internal to GDB has been detected" {
>> + fail "${test} (GDB internal error 1)"
>> + gdb_internal_error_resync
>> + }
>
>
> Could you get rid of some of these by using gdb_test_multiple instead
> of send_gdb/gdb_expect? I haven't looked at structs.exp in detail, so
> I don't have any idea how possible that might be.
I've not really looked at gdb_test_multiple either so I guess we're even
:-) I do know that I can't use "gdb_test" as additional processing is
required dependant on the output.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [commit] Recover from struct-return internal errors
2003-11-20 18:44 ` Andrew Cagney
@ 2003-11-20 18:50 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-11-20 18:50 UTC (permalink / raw)
To: Andrew Cagney; +Cc: David Carlton, gdb-patches
On Thu, Nov 20, 2003 at 01:44:26PM -0500, Andrew Cagney wrote:
> >On Thu, 20 Nov 2003 13:07:18 -0500, Andrew Cagney <ac131313@redhat.com>
> >said:
> >
> >
> >>+ -re "A problem internal to GDB has been detected" {
> >>+ fail "${test} (GDB internal error 1)"
> >>+ gdb_internal_error_resync
> >>+ }
> >
> >
> >Could you get rid of some of these by using gdb_test_multiple instead
> >of send_gdb/gdb_expect? I haven't looked at structs.exp in detail, so
> >I don't have any idea how possible that might be.
>
> I've not really looked at gdb_test_multiple either so I guess we're even
> :-) I do know that I can't use "gdb_test" as additional processing is
> required dependant on the output.
That's what gdb_test_multiple is for. You should be able to remove any
of the "standard" response patterns and replace "gdb_test" with
"gdb_test_multiple" - the arguments change slightly but the expect
block's interface not at all.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-11-20 18:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-20 18:07 [commit] Recover from struct-return internal errors Andrew Cagney
2003-11-20 18:32 ` David Carlton
2003-11-20 18:44 ` Andrew Cagney
2003-11-20 18:50 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox