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: Yao Qi <yao at codesourcery dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>, Miroslav Franc <mfranc at redhat dot com>
- Date: Fri, 10 Oct 2014 13:55:50 +0800
- 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>
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
These two patches look right to me.
> * \[\r\n\]+ can be used to anchor the beginning of the pattern, in the sense
> of Perl regex ^ /m match. At least I have found such cases in existing
> *.exp files so I used that. Using ^ really does not work.
>
> But I am not aware how to do Perl regex $ /m match. Using $ really does
> not work. But this means that for example the trailing
> ( \\((host|target) evals\\))?
> on the line
> "\[\r\n\]+\[ \t\]+stop only if i == 1( \\((host|target) evals\\))?"
> originally made sense there but now it can be removed as it has no longer
> any functionality there - it will match now any trailing line garbage.
In this test case, ( \\((host|target) evals\\))? isn't needed in the
pattern. What we test here is to save breakpoints into file and restore
them from file. The contents saved in file are:
break save-bp.c:31
condition $bpnum i == 1
the information about the place where the condition is evaluated isn't
saved, so we don't need to check. Breakpoint save and restore has
nothing to do with where the condition is evaluated (host or target). I
am fine to leave it here now.
--
Yao (éå)