Re: [patch] Remove comments from user_code in gdb_test_multiple

Markus Deuling
2008-03-27T15:47:13Z

Daniel Jacobowitz schrieb:
> On Thu, Mar 27, 2008 at 04:23:38PM +0100, Markus Deuling wrote:
>> Hi,
>>
>> this patch removes all comments from user_code given to gdb_test_multiple. This allows
>> to have comments in code snippets given to gdb_test_multiple like for exmaple proposed
>> in this patch:
>>
>> http://sourceware.org/ml/gdb-patches/2008-03/msg00290.html
>>
>>
>> ChangeLog:
>>
>> * lib/gdb.exp (gdb_test_multiple): Remove comments from user_code.
>>
>> Ok ?
>
> Won't this eat quoted # signs in the middle of patterns?
> I suggest you move the comment inside the code block where it would be
> valid, instead.
>

Hm, your're right. They're eaten :-(

S.th. like this isn't possible currently. Moving this comment above gdb_test_multiple might be
confusing (there might be a lot more re's with different meanings):

gdb_test_multiple "info spu mailbox" "$msg" {
-re "SPU Outbound Mailbox.*0x00000000.*SPU Outbound Interrupt Mailbox.*0x00000000.*$gdb_prompt $" {
pass "$msg"
}
# Older kernels had a bug that caused them to return arbitrary values when
# attempting to read from an empty mailbox via spufs.
-re "SPU Outbound Mailbox.*0x.*SPU Outbound Interrupt Mailbox.*0x.*$gdb_prompt $" {
xfail "$msg"
}
}

What do you think about the spu info mailbox patch then ? Move the comment above gdb_test_multiple ? Or use send_gdb/gdb_expect and have the comments in the right place?

--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com