This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Pinging Michael C
On Mon, Sep 16, 2002 at 10:03:16AM -0700, David Carlton wrote:
> On Mon, 16 Sep 2002 11:09:21 -0400, Daniel Jacobowitz <drow@mvista.com> said:
> > On Mon, Sep 16, 2002 at 10:55:47AM -0400, Fernando Nasser wrote:
> >> Daniel Jacobowitz wrote:
>
> >>> http://sources.redhat.com/ml/gdb-patches/2002-08/msg00695.html
>
> >> I wonder if next will relly be more reliable. Anyway, we can try
> >> -- the test is not about breakpoints.
>
> > I hadn't actually looked at this one. David, there's an easier way
> > - if you look in lib/gdb.exp, gdb_get_line_number. Is that closer
> > to what you want? It should be more reliable than 'next'ing.
>
> Honestly, I don't know if either of them is reliable, as is written.
> The situation is that m-static.cc constructs a bunch of objects that
> it doesn't do anything with; m-static.exp tries to stop after each
> object is constructed, and then examine what the object looks like.
>
> And it seems to me that, whether you use next or breakpoints (and
> whether you do the latter with hard-coded numbers (blech), relative
> offsets, or with gdb_get_line_number), you're going to run into
> problems in that GDB might not be willing to stop at every line, and
> that whether or not it is willing might depend on the specific
> compiler, compiler options, etc. that are being used.
>
> Personally, I don't see any reason why the test shouldn't just
> construct all the objects before inspecting any of them with GDB. So
> what makes sense to me would be to put a breakpoint on the return line
> (using gdb_get_line_number, presumably), run until that, and only then
> inspect all the objects that have been constructed.
I like this. Would you mind doing it that way? It's much less
error-prone.
> So would it be okay if I changed the test with all the next's to
> construct all the objects before examining any of them, updated the
> comments on the one test to reflect the fact that the bug has been
> fixed, and then check them in?
Well, I think Fernando has approved the testsuite-side and I'm fine
with the C++ of the tests. I'd say yes.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer