* Trivial fix to annota1.exp
@ 2003-09-12 20:31 Jim Ingham
2003-09-18 19:39 ` Elena Zannoni
0 siblings, 1 reply; 5+ messages in thread
From: Jim Ingham @ 2003-09-12 20:31 UTC (permalink / raw)
To: gdb-patches
I think that the backtrace through a signal handler test in annota1.exp
is wrong. It uses a "*" in the regexp for the part that is looking for
the signal handler frame. Because of that, all the test really does is
count the number of frames, and require they be three or more frames.
It doesn't check that a signal frame is on the stack at all.
I think you really need a "+" instead, or I don't understand the point
of the test.
Is this okay, it still passes on Linux...
Index: annota1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
retrieving revision 1.12
diff -r1.12 annota1.exp
299c299
< -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
$hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2
$hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
---
> -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
$hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2
$hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
Jim
--
Jim Ingham jingham@apple.com
Developer Tools
Apple Computer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trivial fix to annota1.exp
2003-09-12 20:31 Trivial fix to annota1.exp Jim Ingham
@ 2003-09-18 19:39 ` Elena Zannoni
2003-09-18 20:20 ` Jim Ingham
0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2003-09-18 19:39 UTC (permalink / raw)
To: Jim Ingham; +Cc: gdb-patches
Jim Ingham writes:
> I think that the backtrace through a signal handler test in annota1.exp
> is wrong. It uses a "*" in the regexp for the part that is looking for
> the signal handler frame. Because of that, all the test really does is
> count the number of frames, and require they be three or more frames.
> It doesn't check that a signal frame is on the stack at all.
>
> I think you really need a "+" instead, or I don't understand the point
> of the test.
>
> Is this okay, it still passes on Linux...
>
I think you are right. I don't think there is any case where we want
to pass matching 0 occurrences of that pattern. Would you like to
submit a proper patch?
elena
> Index: annota1.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
> retrieving revision 1.12
> diff -r1.12 annota1.exp
> 299c299
> < -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
> called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2
> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
> ---
> > -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
> called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2
> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
>
> Jim
> --
> Jim Ingham jingham@apple.com
> Developer Tools
> Apple Computer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trivial fix to annota1.exp
2003-09-18 19:39 ` Elena Zannoni
@ 2003-09-18 20:20 ` Jim Ingham
2003-09-18 21:20 ` Jim Ingham
0 siblings, 1 reply; 5+ messages in thread
From: Jim Ingham @ 2003-09-18 20:20 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 101 bytes --]
By proper you mean not line-wrapped by Mail.app?
If so, I would be overjoyed to try an attachment:
[-- Attachment #2: annota1.exp.diff --]
[-- Type: application/octet-stream, Size: 1254 bytes --]
Index: annota1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
retrieving revision 1.12
diff -p -r1.12 annota1.exp
*** annota1.exp 9 Jul 2003 13:19:08 -0000 1.12
--- annota1.exp 18 Sep 2003 20:14:44 -0000
*************** match_max 3000
*** 296,302 ****
verbose "match_max now is: [match_max]"
send_gdb "backtrace\n"
gdb_expect {
! -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
pass "backtrace @ signal handler"
}
-re ".*$gdb_prompt$" { fail "backtrace @ signal handler" }
--- 296,302 ----
verbose "match_max now is: [match_max]"
send_gdb "backtrace\n"
gdb_expect {
! -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
pass "backtrace @ signal handler"
}
-re ".*$gdb_prompt$" { fail "backtrace @ signal handler" }
[-- Attachment #3: Type: text/plain, Size: 1923 bytes --]
If this doesn't make it, I would be slightly depressed to point out
that the change is 1 character, the "*" after "signal handler
called.\rnrnrnr)" to a "+".
Jim
On Sep 18, 2003, at 12:48 PM, Elena Zannoni wrote:
> Jim Ingham writes:
>> I think that the backtrace through a signal handler test in
>> annota1.exp
>> is wrong. It uses a "*" in the regexp for the part that is looking
>> for
>> the signal handler frame. Because of that, all the test really does
>> is
>> count the number of frames, and require they be three or more frames.
>> It doesn't check that a signal frame is on the stack at all.
>>
>> I think you really need a "+" instead, or I don't understand the point
>> of the test.
>>
>> Is this okay, it still passes on Linux...
>>
>
> I think you are right. I don't think there is any case where we want
> to pass matching 0 occurrences of that pattern. Would you like to
> submit a proper patch?
>
> elena
>
>
>> Index: annota1.exp
>> ===================================================================
>> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
>> retrieving revision 1.12
>> diff -r1.12 annota1.exp
>> 299c299
>> < -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
>> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
>> called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2
>> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
>> ---
>>> -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
>> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
>> called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2
>> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
>>
>> Jim
>> --
>> Jim Ingham jingham@apple.com
>> Developer Tools
>> Apple Computer
>>
--
Jim Ingham jingham@apple.com
Developer Tools
Apple Computer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trivial fix to annota1.exp
2003-09-18 20:20 ` Jim Ingham
@ 2003-09-18 21:20 ` Jim Ingham
2003-09-23 19:00 ` Elena Zannoni
0 siblings, 1 reply; 5+ messages in thread
From: Jim Ingham @ 2003-09-18 21:20 UTC (permalink / raw)
To: Jim Ingham; +Cc: Elena Zannoni, gdb-patches
Oh, yeah, you might want a ChangeLog entry as well:
2003-09-18 Jim Ingham <jingham@apple.com>
* annota1.exp: Actually require the presence of the signal
handler
frame in the backtrace for the test testing the presence of the
signal handler frame.
Jim
On Sep 18, 2003, at 1:20 PM, Jim Ingham wrote:
> By proper you mean not line-wrapped by Mail.app?
>
> If so, I would be overjoyed to try an attachment:
>
> <annota1.exp.diff>
>
> If this doesn't make it, I would be slightly depressed to point out
> that the change is 1 character, the "*" after "signal handler
> called.\rnrnrnr)" to a "+".
>
> Jim
>
> On Sep 18, 2003, at 12:48 PM, Elena Zannoni wrote:
>
>> Jim Ingham writes:
>>> I think that the backtrace through a signal handler test in
>>> annota1.exp
>>> is wrong. It uses a "*" in the regexp for the part that is looking
>>> for
>>> the signal handler frame. Because of that, all the test really does
>>> is
>>> count the number of frames, and require they be three or more frames.
>>> It doesn't check that a signal frame is on the stack at all.
>>>
>>> I think you really need a "+" instead, or I don't understand the
>>> point
>>> of the test.
>>>
>>> Is this okay, it still passes on Linux...
>>>
>>
>> I think you are right. I don't think there is any case where we want
>> to pass matching 0 occurrences of that pattern. Would you like to
>> submit a proper patch?
>>
>> elena
>>
>>
>>> Index: annota1.exp
>>> ===================================================================
>>> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
>>> retrieving revision 1.12
>>> diff -r1.12 annota1.exp
>>> 299c299
>>> < -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
>>> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
>>> called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2
>>> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
>>> ---
>>>> -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
>>> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
>>> called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2
>>> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
>>>
>>> Jim
>>> --
>>> Jim Ingham jingham@apple.com
>>> Developer Tools
>>> Apple Computer
>>>
> --
> Jim Ingham jingham@apple.com
> Developer Tools
> Apple Computer
>
>
--
Jim Ingham jingham@apple.com
Developer Tools
Apple Computer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Trivial fix to annota1.exp
2003-09-18 21:20 ` Jim Ingham
@ 2003-09-23 19:00 ` Elena Zannoni
0 siblings, 0 replies; 5+ messages in thread
From: Elena Zannoni @ 2003-09-23 19:00 UTC (permalink / raw)
To: Jim Ingham; +Cc: Elena Zannoni, gdb-patches
Jim Ingham writes:
> Oh, yeah, you might want a ChangeLog entry as well:
That's what I was after.
elena
>
> 2003-09-18 Jim Ingham <jingham@apple.com>
>
> * annota1.exp: Actually require the presence of the signal
> handler
> frame in the backtrace for the test testing the presence of the
> signal handler frame.
>
> Jim
> On Sep 18, 2003, at 1:20 PM, Jim Ingham wrote:
>
> > By proper you mean not line-wrapped by Mail.app?
> >
> > If so, I would be overjoyed to try an attachment:
> >
> > <annota1.exp.diff>
> >
> > If this doesn't make it, I would be slightly depressed to point out
> > that the change is 1 character, the "*" after "signal handler
> > called.\rnrnrnr)" to a "+".
> >
> > Jim
> >
> > On Sep 18, 2003, at 12:48 PM, Elena Zannoni wrote:
> >
> >> Jim Ingham writes:
> >>> I think that the backtrace through a signal handler test in
> >>> annota1.exp
> >>> is wrong. It uses a "*" in the regexp for the part that is looking
> >>> for
> >>> the signal handler frame. Because of that, all the test really does
> >>> is
> >>> count the number of frames, and require they be three or more frames.
> >>> It doesn't check that a signal frame is on the stack at all.
> >>>
> >>> I think you really need a "+" instead, or I don't understand the
> >>> point
> >>> of the test.
> >>>
> >>> Is this okay, it still passes on Linux...
> >>>
> >>
> >> I think you are right. I don't think there is any case where we want
> >> to pass matching 0 occurrences of that pattern. Would you like to
> >> submit a proper patch?
> >>
> >> elena
> >>
> >>
> >>> Index: annota1.exp
> >>> ===================================================================
> >>> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
> >>> retrieving revision 1.12
> >>> diff -r1.12 annota1.exp
> >>> 299c299
> >>> < -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
> >>> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
> >>> called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2
> >>> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
> >>> ---
> >>>> -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1
> >>> $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler
> >>> called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2
> >>> $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
> >>>
> >>> Jim
> >>> --
> >>> Jim Ingham jingham@apple.com
> >>> Developer Tools
> >>> Apple Computer
> >>>
> > --
> > Jim Ingham jingham@apple.com
> > Developer Tools
> > Apple Computer
> >
> >
> --
> Jim Ingham jingham@apple.com
> Developer Tools
> Apple Computer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-23 19:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-12 20:31 Trivial fix to annota1.exp Jim Ingham
2003-09-18 19:39 ` Elena Zannoni
2003-09-18 20:20 ` Jim Ingham
2003-09-18 21:20 ` Jim Ingham
2003-09-23 19:00 ` Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox