From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nx232.node01.secure-mailgate.com (nx232.node01.secure-mailgate.com [89.22.108.232]) by sourceware.org (Postfix) with ESMTPS id 801323858D39 for ; Thu, 9 May 2024 08:45:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 801323858D39 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=hotmail.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 801323858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.22.108.232 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715244322; cv=none; b=Ga0B3VEKkIZbTnLSEUj8kh/S3zHVyQqEaB67ajZEkM+j5nnOTuLoRuMD9oljZ74UBLXLndY+jZhb2ZvbEo0XZ9/PnHHFVWyeCgS5uj1+jbzXrHC9rU2R/rKQ4r2tFTOUe40dQiVHsb4u0BIj5SfsAPZJOQMM51GwdbJOEa9lR9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715244322; c=relaxed/simple; bh=VnFfCR1V3UNS7WxJKhNmg590dbupRJWULMxlYBBqNqU=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=HF6ZsZvBw0yBESde3gpsQc6hxkBxF32Deh3aGziYzbv5vHBMt07yFhiYHDqzCtqQHkSXzaBdY2mEaVyZceRErTJi2PW2Evp0YIzTOazrHtmurdiucXxnXJExKLApAf5I2PYD/yvCLZaySJERqKTDF3Qz2iadk3FB5r4T8eygmV8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from web73.alfahosting-server.de ([5.44.111.53]) by node01.secure-mailgate.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1s4zOp-00HLF6-SR; Thu, 09 May 2024 10:45:13 +0200 X-SecureMailgate-Identity: web24339892p2;web73.alfahosting-server.de Received: from proxy01.mail.wum.dogado.net (proxy01.mail.wum.dogado.net [5.44.111.201]) (Authenticated sender: web24339892p2) by web73.alfahosting-server.de (Postfix) with ESMTPSA id 21780287962; Thu, 9 May 2024 10:45:10 +0200 (CEST) X-SecureMailgate-Identity: web24339892p2;web73.alfahosting-server.de Message-ID: Date: Thu, 9 May 2024 10:47:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 09/12] gdb_target_is_native -> gdb_protocol_is_native To: Tom Tromey , Pedro Alves Cc: gdb-patches@sourceware.org References: <20240419151342.1592474-1-pedro@palves.net> <20240419151342.1592474-10-pedro@palves.net> <87edb1w5iq.fsf@tromey.com> Content-Language: en-US From: Bernd Edlinger In-Reply-To: <87edb1w5iq.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <171524431082.700690.5935808677625145364@web73.alfahosting-server.de> X-PPP-Vhost: edlinger-online.de X-Originating-IP: 5.44.111.53 X-SecureMailgate-Domain: web73.alfahosting-server.de X-SecureMailgate-Username: 5.44.111.53 Authentication-Results: secure-mailgate.com; auth=pass smtp.auth=5.44.111.53@web73.alfahosting-server.de X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.07) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT9tZdft48uofDsUy67G1jbqPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5yXDdH2qDzdBCC3QGuN41WLX119/ZqkB1DjgpRfurudewK0 85OYn8S9ZJwCZa4BpjQIZ/EaTbqbeeUbzbiAxxzAqLhEJBC9mSsTNIKN73XmbvRt3CFekIA9GDtW V5nXrUkEybI1sOftHmSKUCHCvcq0TzZjnkrrL1mACMw/UF0G0cqW7iLXaupMMVBXveyV59N1nz8E eUiDVlUjGaf+dj0OfkTikaMrgo9jEt4p9LO7Quizgqn9w33shSQILm8onT0pBnj6F4jzJinAnnLA xKdjGDfBMhOKps5lreM9m1yVlU49L580IwHza2T+59S3hninffahCa+FoaHPkyfeJkZarJ6UFTYW JmrE41TM+DFHrjH1YCeXqtErwmSC00ZAfW97InMhTLoaqcNmmhdXhloQuZvJzloHvXAavZZu2bOH z0lNEHF1LSWF/K4qKVXG9aOTDjsyVOKBsV3yeU+1lUAfUKtxqlLS7U0QyBedkUrCnnjUA84bJG6o ps66fu+VDOHB+GmylApEAgEVxR1JXzn58qlvf55YpORFjTzkezYmCpMWoMak8txHpbK39gB4pajm 2cOjhiuwZOEgwMRANRwLXj3gjnaj+6UA0UPkADHoS6gJylT+GdeVzzo8fCPU9s2+535SEn7rjFiH ERuQKNS8V4bWnQKOodYnULo2OnxrN5BrJsmbpSO31qFbKuyqEASNZlZP1oEKFzNnpKb3NDD1B5hQ 6nsDvccjqgmDvD9Wh+d95jmxJrTbOJ1VDB0Hz+1KFq543anOrUIH9j7Rgnr80z6bhalFEM/pjPCQ A+BAlsLkUmIO6qmqQiXGXnh8nGPs2DoXlEIuxwcNxsQpSWwQCmFPje6vvfYmo/29qbgmYWOUeFym fG6/Umv7bXzA4TjJQ3+6q4AlHWfFiKC1INpQgixOkROzlFmPoQzrUxt2QtGvoAbg/gYhn1rNHAtr CLJ+DFs9rCvgkXTNUDtJGGC7HN0ZH9R9y+BoEHkLvpvHd/panaInSZawg2GKxKTBSggH5HZYCChE LMr3mOCkC6Us4BAah0N3qPEwUyYM+XoU0jKwlPiG4UsLBrBnQvuLJa/3CbsT4pSpRDO/jqmz31T6 v+NivHPR1cUy3QhHKE+wc37KjLeTzjLAekKGKQCYPhI= X-Report-Abuse-To: spam@node04.secure-mailgate.com X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_DMARC_NONE,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP 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 4/19/24 20:50, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > > Pedro> gdb_is_target_native uses "maint print target-stack", which is > Pedro> unnecessary when checking whether gdb_protocol is empty would do. > Pedro> Checking gdb_protocol is more efficient, and can be done before > Pedro> starting GDB and running to main, unlike gdb_is_target_native. > > Pedro> This adds a new gdb_protocol_is_native procedure, and uses it in place > Pedro> of gdb_is_target_native. > > Pedro> At first, I thought that we'd end up with a few testcases needing to > Pedro> use gdb_is_target_native still, especially multi-target tests that > Pedro> connect to targets different from the default board target, but no, > Pedro> actually all uses of gdb_is_target_native could be converted. > Pedro> gdb_is_target_native will be eliminated in a following patch. > > Pedro> In some spots, we no longer need to defer the check until after > Pedro> starting GDB, so the patch adjusts accordingly. > > Seems reasonable to me. > Approved-By: Tom Tromey > > Tom > Hi Pedro, Sorry, for the late reply. I am testing with riscv-unknown-elf target using simulator. Before this patch I had: PASS: gdb.base/load-command.exp: probe for target native PASS: gdb.base/load-command.exp: check initial value of the_variable PASS: gdb.base/load-command.exp: manually change the_variable PASS: gdb.base/load-command.exp: check manually changed value of the_variable PASS: gdb.base/load-command.exp: reload: re-load binary PASS: gdb.base/load-command.exp: reload: check initial value of the_variable and now UNSUPPORTED: gdb.base/load-command.exp: the native target does not support the load command note: I use RUNTESTFLAGS="--target_board=multi-sim SIM=riscv-unknown-elf-sim" but the test was working fine, because with this target we use target sim, load, and can runto main, inspect variables, etc. Regards Bernd.