This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/PATCH] Testsuite: set sysroot when using gdbserver


On 03/28/2019 11:02 AM, Alan Hayward wrote:
> 
> 
>> On 28 Mar 2019, at 05:14, Kevin Buettner <kevinb@redhat.com> wrote:
>>
>> Hi Alan,
>>
>> I want to apologize in case my latter comment came across as harsh.  I
>> think I could have phrased it more diplomatically.
> 
> Oh, no, that’s fine :)
> 
>>
>> I'll note that I also have an interest in setting up sysroot for the
>> OpenMP tests that I've been working on.  So I am genuinely interested
>> in whether or how sysroot can be set from a board file.
>>
>> Also, making the tests run faster is definitely a good thing, so
>> thanks for looking into this.
> 

IMO we could also look at this from the perspective that the slowness is
something that we should tackle, improve in gdb somehow.  For example, we
could improve caching a lot.  We have a readahead cache for vFile:pread, but
we could also have a persistent cache layer, so that we wouldn't be
downloading the same shared library files over and over again.

> 
> I don’t know much about how the board files work, but, looks like I can
> just add a flag via “set_board_info” in the relevant board files.
> 
> I can then check for it at the end of gdbserver_start. Or instead check
> at the same place “target remote” is run (although I couldn’t find where
> that was yesterday!).

Probably just adding

 set GDBFLAGS "${GDBFLAGS} -ex \"set sysroot /\""

to testsuite/boards/local-board.exp is all you'd need.

I think it'd be good to have a testcase in gdb.server/ that explicitly
tests debugging a bit with "set sysroot target:" enabled, so that we
don't lose coverage of that.

> This looks like a much better way of doing it.
> 
> I’m going to we on holiday for the next week, so I doubt I’ll be able to
> get a new patch together before then.  I will look at it as soon as I get
> back, as I’d like to get rid of the buildbot timeouts.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]