This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv2 1/2] save breakpoints does not save disabled breakpoints correctly
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Miroslav Franc <mfranc at redhat dot com>
- Date: Fri, 10 Oct 2014 13:31:21 +0100
- Subject: Re: [patchv2 1/2] save breakpoints does not save disabled breakpoints correctly
- Authentication-results: sourceware.org; auth=none
- References: <20141003203228 dot GB30562 at host2 dot jankratochvil dot net> <87mw95s5xz dot fsf at codesourcery dot com> <20141009191035 dot GB26010 at host2 dot jankratochvil dot net>
On 10/09/2014 08:10 PM, Jan Kratochvil wrote:
> On Thu, 09 Oct 2014 15:55:52 +0200, Yao Qi wrote:
>> to convert gdb_test to gdb_test_sequence,
>> so that the patterns are written for each line, and will be more clear.
>
> Done. But IMO it is a functionality regression as:
>
> * gdb_test_sequence permits arbitary number of lines of text between those
> lines being matched. Former regex string did not allow it.
> This may make a difference if GDB regresses by printing some unexpected
> line after the breakpoint info line (like a "silent" line).
In places were we want to avoid that, and we want to write a pattern
that spawns multiple lines, we build the regex with join. E.g.,
gdb.btrace/instruction_history.exp:
# test that we see the expected instructions
gdb_test "record instruction-history 3,7" [join [list \
"3\t 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
"4\t 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tdec %eax" \
"5\t 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tjmp 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>" \
"6\t 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tcmp \\\$0x0,%eax" \
"7\t 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>:\tje 0x\[0-9a-f\]+ <loop\\+\[0-9\]+>\r" \
] "\r\n"]
This grep will find more cases:
grep '"\\r\\n"' testsuite/* -rn
Thanks,
Pedro Alves