This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] GDB test suite: Add helper for locating core files
- From: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>, Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 17 Oct 2017 10:22:40 +0100
- Subject: Re: [PATCH 1/2] GDB test suite: Add helper for locating core files
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8E9CC7E381
- References: <1505760152-28775-1-git-send-email-arnez@linux.vnet.ibm.com> <1505760152-28775-2-git-send-email-arnez@linux.vnet.ibm.com> <20171007094545.1bba5c51@pinnacle.lan> <m31smcp3b6.fsf@oc1027705133.ibm.com> <a02b8961-d8c3-a0a9-9887-23a24e63962d@redhat.com> <7c57a718-2986-c089-6fbf-2e352e8cf9d4@redhat.com>
On 10/12/2017 05:47 PM, Pedro Alves wrote:
> On 10/12/2017 02:47 PM, Pedro Alves wrote:
>> On 10/09/2017 07:46 PM, Andreas Arnez wrote:
>>
>>> @@ -5883,7 +5883,7 @@ proc run_and_get_core {binfile {arg ""}} {
>>> # specified. Return that path name, or "" if no core file was found.
>>>
>>> proc find_core {binfile coredir {destcore ""}} {
>>> - if {[is_remote target]} {
>>> + if {![isnative]} {
>>> warning "Can not access remote core file."
>>> return ""
>>> }
>>
>> This seems incorrect to me. "isnative" only checks
>> if the build and target _triplets_ are the same. So
>> foo-linux-gnu gdb x foo-linux-gnu gdbserver on separate
>> machine still returns isnative==true.
>>
>> I think the real problem is that the native-gdbserver board
>> returns true to is_remote, when I think it shouldn't.
>>
>> Doing that alone results in fallout in the testsuite, of
>> course. I'm seeing if fixing it is doable.
>
> It's doable. Below's what I have. This exposed a number of
> tests that were skipped for stale reasons.
>
> The new "set cwd" command helps with this, which is nice
> in the "I love it when a plan comes together" sense. :-)
>
> I should probably split this up and submit in pieces.
FYI, this is now fully done and all pushed to master.
The native-gdbserver board no longer returns true
to [is_remote target].
Thanks,
Pedro Alves