This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/3] Create arch_lwp_info class hierarchy
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Fri, 18 Aug 2017 12:23:47 +0100
- Subject: Re: [PATCH 0/3] Create arch_lwp_info class hierarchy
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.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 ED7A0356EA
- References: <1500892797-7523-1-git-send-email-simon.marchi@ericsson.com> <22f9058d-52de-293a-eef8-6af1572955d0@redhat.com> <ed694b0866b8f64a32978b9a9dccf2f5@polymtl.ca> <fce4edb6-c6ec-7eaa-4cad-1fa5f290ff27@redhat.com> <d5021e467857df4227744e5c15e95c48@polymtl.ca>
On 08/16/2017 07:44 PM, Simon Marchi wrote:
> On 2017-08-14 13:53, Pedro Alves wrote:
>> On 08/12/2017 12:29 PM, Simon Marchi wrote:
>>
>>> But then I realized that I forgot to include the header for s390, and
>>> the compiler (when building for a s390 host) didn't warn me. This is
>>> dangerous and fragile since we end up with two definitions of
>>> arch_lwp_info (the s390 one and that fallback one), and nothing to warn
>>> about it.
>>
>> Not sure whether that's really such a bad problem. It seems like the
>> sort of thing that'd crash quite visibly/quickly if you actually try to
>> run the resulting binary. It's not like we're adding ports
>> every day. :-)
>
> How would it crash visibly? I thought it would most likely crash or
> corrupt memory seemingly randomly.
Yeah, I'm just assuming that that randomness would be
noticeable quickly, say, in that it likely wouldn't survive
a test run at least.
> That's irrelevant because of you
> suggestion below, but I'm asking just for the sake of the discussion.
Thanks,
Pedro Alves