From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by sourceware.org (Postfix) with ESMTPS id 60882388FF76 for ; Fri, 7 Jul 2023 12:25:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 60882388FF76 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-313f1085ac2so1782165f8f.1 for ; Fri, 07 Jul 2023 05:25:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688732744; x=1691324744; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6fQUBO8Fttl2ksMb0uijAa3HH6wkRhu6oUfCTt66WJk=; b=Kq1tUPXc+p6iPfUgZWqdGPo8yYAnvirkXG/ySenX4/Q231Ff4nL1dgeeQ4RIfe7Y5z tYaCvVekUTUKUNkuoO8WD+V7tkFaNPlMkc8q4l3SsIkU1446dyneL9jB8bgFDTvUgMSw k3fCIii7he7setvAisOtpGzAZCWt7F1nxo9FfhNrX/lypDbhN1+FupvVFX4muGwU7+B3 IEQZXNguKfkq9W1sVCKoIdAlPTt2v0kko4tGXxBxI2udvrD8Xh47OcOmBkt8ogmUEMAP BFoPE+EWpKHK9pMapc3z0kqO99nNfPQYY8JtFgTRWddr7g+I9OYbiyCy9V+E4XjdypRE mGnQ== X-Gm-Message-State: ABy/qLaVEivXWHoGkCfMVBV51vLHTF685wFI/2+xSco7QWSywEkjCcHk LyZhj1pe3GukBrw44x6p3a0= X-Google-Smtp-Source: APBJJlEPUo3fAiazKunUHP+TMi+WxvTg4dDT0sL9XhgK0nC1CHadvw7Z7fMkJ5kSmQZathM2axF/8A== X-Received: by 2002:adf:e289:0:b0:314:1608:1eec with SMTP id v9-20020adfe289000000b0031416081eecmr4057184wri.63.1688732744032; Fri, 07 Jul 2023 05:25:44 -0700 (PDT) Received: from ?IPV6:2001:8a0:f91d:bc00:1b6e:208c:60cc:dcc? ([2001:8a0:f91d:bc00:1b6e:208c:60cc:dcc]) by smtp.gmail.com with ESMTPSA id b8-20020adfe308000000b003143c06135bsm4330801wrj.50.2023.07.07.05.25.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jul 2023 05:25:43 -0700 (PDT) Message-ID: <01059f8a-0e59-55b5-f530-190c26df5ba3@palves.net> Date: Fri, 7 Jul 2023 13:25:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCHv5 03/11] gdbserver: allow agent expressions to fail with invalid memory access Content-Language: en-US To: Andrew Burgess , gdb-patches@sourceware.org References: <0ef54ed920e1262a07f4a061ecc08bea8fcaee23.1678987897.git.aburgess@redhat.com> From: Pedro Alves In-Reply-To: <0ef54ed920e1262a07f4a061ecc08bea8fcaee23.1678987897.git.aburgess@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-03-16 17:36, Andrew Burgess via Gdb-patches wrote: > This commit extends gdbserver to take account of a failed memory > access from agent_mem_read, and to return a new eval_result_type > expr_eval_invalid_memory_access. > > I have only updated the agent_mem_read calls related directly to > reading memory, I have not updated any of the calls related to > tracepoint data collection. This is just because I'm not familiar > with that area of gdb/gdbserver, and I don't want to break anything, > so leaving the existing behaviour untouched seems like the safest > approach. I think this should update the gdbserver/tracepoint.cc:eval_result_names array at least, though. Otherwise I think a memory error during collection is going to trigger undefined behavior, crash if we're lucky.