Re: [PATCH ver 2] Fix the gdb.ada/inline-section-gc.exp test

Carl Love
2023-11-08T18:03:08Z

Luis, Tom:

On Wed, 2023-11-08 at 16:57 +0000, Luis Machado wrote:
> Hi Carl,
>
> This fixes the FAIL's I had been seeing on aarch64-linux. Thanks!
>
> Some nits...
>
>

<snip>

> > file callee.adb or in
> > +# file caller.adb where the callee function was inlined. Either
> > way, only
> > +# on breakpoint should be reported and it's address should not be
> > at 0x0.
> s/on breakpoint/one breakpoint?
>
> s/and it's/and its?

Fixed both issues.

On Wed, 2023-11-08 at 09:54 -0700, Tom Tromey wrote:> > > > > > "Carl"

<snip>

>
> I think it looks good, but I have one nit.
>
> Carl> +set bp_location1 [gdb_get_line_number "BREAK"
> ${testdir}/callee.adb]
> Carl> +set bp_location2 [expr $bp_location1 - 1]
>
> It would be better to just stick some comment on the relevant line in
> caller.adb and then use gdb_get_line_number to fetch it.

OK, that works. I added a comment to set the line number on. The
comment has to be placed on the line in caller where the BREAK line
ends up after callee is inlined into caller, which is not really
obvious at first glance. I worked hard to make it clear in the comment
and the commit log. Hopefully it is clear to the reader.

Will post version 3.

Thanks for the feedback and help with the patch.

Carl