From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTP id 2CDE2398305F for ; Fri, 12 Jun 2020 21:53:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2CDE2398305F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D0E75117F45 for ; Fri, 12 Jun 2020 17:53:57 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AlDf-YNNTLwF for ; Fri, 12 Jun 2020 17:53:57 -0400 (EDT) Received: from murgatroyd.Home (174-16-104-48.hlrn.qwest.net [174.16.104.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 91C5C117F39 for ; Fri, 12 Jun 2020 17:53:57 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 0/4] Unify string-reading APIs Date: Fri, 12 Jun 2020 15:53:52 -0600 Message-Id: <20200612215356.22145-1-tromey@adacore.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2020 21:53:59 -0000 An old comment notes that gdb has several different ways to read a string from the target. This series tries to simplify this situation. read_memory_string is removed entirely. Perhaps this is the better name, in the end; but I didn't want to move read_string into corelow.c. Maybe we need a new file for the memory-reading functions that are there? (Also I wonder if any of the remaining ones are redundant.) target_read_string is first rewritten in terms of read_string. A subsequent patch changes its API to be simpler. Perhaps further simplification could be done as well. I'm open to suggestions. Regression tested on x86-64 Fedora 30. I also built it using a mingw cross, to make sure windows-nat.c still builds. Tom