Trivial fix to annota1.exp

Jim Ingham jingham@apple.com
Thu Sep 18 20:20:00 GMT 2003


By proper you mean not line-wrapped by Mail.app?

If so, I would be overjoyed to try an attachment:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: annota1.exp.diff
Type: application/octet-stream
Size: 1254 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20030918/0b7e0a44/attachment.obj>
-------------- next part --------------


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



More information about the Gdb-patches mailing list