From patchwork Tue Nov 21 12:04:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lancelot SIX X-Patchwork-Id: 80463 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E2F93858029 for ; Tue, 21 Nov 2023 12:07:00 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2056.outbound.protection.outlook.com [40.107.223.56]) by sourceware.org (Postfix) with ESMTPS id EFD53385828C for ; Tue, 21 Nov 2023 12:05:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EFD53385828C Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EFD53385828C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.223.56 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700568361; cv=pass; b=ryLbSwpEYl+uoM1mkAlC8scmuEltEHq+8ieQSTuEUPdrjFacWHHYdH+O++zAaIVGs66IMgvp1qidS+gkaCikjYUwL+jv2/4srTJh7vX9eUiQeNOc/HWcGQ9hA/9gV2Yt6fhNNDicIwgGPX/mEbwa0QZYmSoorL47GmhCx8ucxgA= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700568361; c=relaxed/simple; bh=IJ3sopvqL9ITvwl0PSiMXwVI3M5dkW9YFDDl18UI+rY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BVnhWIsXdhMe8DsKDfzpYTpaLFBqx/RIHd6Pqf81IvKC4POul6CLJ+NqgaSEasLmJLrpfqHX6F2FtE2a0AANLzVWiOVYX/Cphu/ygBwqQSnecqw0RoHcNuCyx+Hqnx2PXfPthG8bXrv/07C/GVkkYQ+44DwlWntOcRQYknwKJD8= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PMudinFVkdnuApT46MIcpqH0KHDklg8Phns8RRJEHalsIIlANE6uWSnSzyQWi+kNpG2DP6qzqQ2RAH8quuguZfNHfFfS8PJGFV4OxgynSHlNRulQVKJbAIkplW+2edCBICxoTmp9PhZM3YQkjT/8RwckroFP44oAjoedWXYM0nzt4SwR1acAg9Vas6zG7qi9rprz2ij4cHTqapJW0/U3ox61O/ZiXGHEejcmtp4NUhHxtp6cssoq8wU2gM0vbtEAVOe57Thwql/lI1g9gocL3mXPsZEtQ9IKydxZZonmfouu7tppkQpD7+toxjUvVLIunf6XWEH6C9a46wNR4fevig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iF0AlYRLx7oUncqxsxcHgI6IgNf51ZJPVc2PTLEQkZI=; b=ZnFa6OPMXSDMk8byUA6cY2e4b3rXWSucggPgralutOh2Uliru/7bwg7mHa7CyyOgs5VgFDXJkCV9+8MQ+olOmNVLPZvspzIqr9XuhpJgI5G236oLaa3XNzHec/ar+hTa7qsMX8SZhRls2WtVBcb765/Wo4cHGJ8jKnsFCdeNtnlAR54B/Ze2a3XN8vWncYoFy5b4fKCjca8vQACsXMbo6pITmZeNHo7L8cIkn4ADWdTe3ID+5DT1mgAmMah2uEiBmXbjFhn7fke7fztSOE2BKPXoguBYyiEo1J7mGaNbYyxm1VjAAoqZqUJzvgWpxGLolkPvafpn9pV+1fA1bjwxcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iF0AlYRLx7oUncqxsxcHgI6IgNf51ZJPVc2PTLEQkZI=; b=cQizg46LMB2QcspXke/GlNVzChUJ3nlQkZ/63JbzpZcIBdKWKNkCfvQ/Ay2Ot54Bor/TSUb+M9PO3eXXqB+9sNCrc8YnsqGN+tM+LtnT5ytfpNlLUqdYXt7Bs1fNZVZVLkIL+xUiApiXzw4CJtu87xWHa9S6lFlt66yY3RO72Rs= Received: from MN2PR12CA0034.namprd12.prod.outlook.com (2603:10b6:208:a8::47) by DM6PR12MB4499.namprd12.prod.outlook.com (2603:10b6:5:2ab::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.28; Tue, 21 Nov 2023 12:05:54 +0000 Received: from MN1PEPF0000F0E4.namprd04.prod.outlook.com (2603:10b6:208:a8:cafe::59) by MN2PR12CA0034.outlook.office365.com (2603:10b6:208:a8::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.27 via Frontend Transport; Tue, 21 Nov 2023 12:05:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MN1PEPF0000F0E4.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7025.12 via Frontend Transport; Tue, 21 Nov 2023 12:05:54 +0000 Received: from hpe6u-23.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 21 Nov 2023 06:05:51 -0600 From: Lancelot Six To: CC: , , Lancelot Six Subject: [COMMITTED PATCH v2 5/9] gdb: Remove uses of gdb::to_string (const std::string_view &) Date: Tue, 21 Nov 2023 12:04:56 +0000 Message-ID: <20231121120500.1394523-6-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231028204821.fp5hh7bahrmrnpjl@hpe6u-23> References: <20231028204821.fp5hh7bahrmrnpjl@hpe6u-23> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000F0E4:EE_|DM6PR12MB4499:EE_ X-MS-Office365-Filtering-Correlation-Id: 1509ab23-0159-4719-b467-08dbea8a3650 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vxVFtl4pgKtI9S0QupzpJ7WackJQv/7Fi2eFM9uf3Q7PxhlwThpq2VsrU8ziDs/pABv5DPpdA+ESfhBvI9GjJMYxc7Uvd6OwoFprWn4K5F4eGbfWxEwdhwjyl11GFHvu1oJghitVR5PpTLTFx/CCpmeN+Lss+QbisvI6fnNK4GKQXdQirciJCQNj9cPNgaAUcvaz32MSLvuM91M7k3+kk4V3r0fF6dh7QB6edjWFOrdb3kwojrKV7uV5ve1qun0WkZG9J7HnX42mxwWi0fj/e20rtBDeqfPnfKWDmcNvhSwGdXS/Alp5S3k7WFvh9rWfuxsmGreuaPAvQpvLs76zwjb8MlpJt2zPAa1TYZ/fhwkaMNkN7sTYS1QKQvg7mYRv1ghfejVW9FSyOU9DQH5jxsHm8sgCRFIVkzkpIiJty1DUVqFIQxDGCqcsl9DQ4QYmywhMR4cUVN9wzJJR6FoCqAg0oEzwd/hrBqb5N7Wb9cbsrRqKj7pcLzVMVuiB+7W3aXulG3WwL/4mPxWfDRbHH7xyvJecpwQqtUk1nc+tlm5Mk31a68c9TOzPMhpEe6Cm7yNOv0YI2jW/m4waw9pnT5O55CWstUfKQh6Du27WxvzeGiu9+rpa5WgUk0IJ+MfQXVAXyTJqWTTlkLThrk37ma1zvTKqMpDjPyzkS1PAdj8w/4KWNmt5JPm1JhvzAQihuWF4QbzU1JrNOV6vdCaAzXvzE4/24s5mMocYm6FILYSs8MlgZR216c0mU/fjq3nSaAVCi07Mj8S6QaP8Jy6haan4UXzPZeTKmYqEpzzliS1fcRmUyW5Ccw3DYpJIx2Dl X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(346002)(396003)(136003)(39860400002)(230273577357003)(230173577357003)(230922051799003)(451199024)(64100799003)(186009)(82310400011)(1800799012)(36840700001)(46966006)(40470700004)(40460700003)(83380400001)(426003)(336012)(26005)(16526019)(1076003)(47076005)(36860700001)(8676002)(4326008)(8936002)(44832011)(2906002)(30864003)(5660300002)(41300700001)(478600001)(70586007)(7696005)(70206006)(6916009)(54906003)(316002)(36756003)(81166007)(86362001)(82740400003)(356005)(2616005)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2023 12:05:54.0233 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1509ab23-0159-4719-b467-08dbea8a3650 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MN1PEPF0000F0E4.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4499 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org This patch removes all uses of to_string(const std::string_view&) and use the std::string ctor or implicit conversion from std::string_view to std::string instead. A later patch will remove this gdb::to_string while removing gdbsupport/gdb_string_view.h. Change-Id: I877cde557a0727be7b0435107e3c7a2aac165895 Approved-By: Tom Tromey Approved-By: Pedro Alves --- gdb/ada-lang.c | 21 +++++++++------------ gdb/amdgpu-tdep.c | 19 +++++++++---------- gdb/debuginfod-support.c | 4 +--- gdb/dwarf2/read.c | 3 +-- gdb/eval.c | 1 - gdb/solib-rocm.c | 9 ++++----- 6 files changed, 24 insertions(+), 33 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 843583ecb40..ff7222c7eed 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -58,7 +58,6 @@ #include "gdbsupport/function-view.h" #include "gdbsupport/byte-vector.h" #include "gdbsupport/selftest.h" -#include "gdbsupport/gdb_string_view.h" #include #include "ada-exp.h" #include "charset.h" @@ -1041,7 +1040,7 @@ ada_fold_name (std::string_view name, bool throw_on_error = false) static std::string fold_storage; if (!name.empty () && name[0] == '\'') - fold_storage = gdb::to_string (name.substr (1, name.size () - 2)); + fold_storage = name.substr (1, name.size () - 2); else { /* Why convert to UTF-32 and implement our own case-folding, @@ -1082,12 +1081,12 @@ ada_fold_name (std::string_view name, bool throw_on_error = false) warned = true; warning (_("could not convert '%s' from the host encoding (%s) to UTF-32.\n" "This normally should not happen, please file a bug report."), - gdb::to_string (name).c_str (), host_charset ()); + std::string (name).c_str (), host_charset ()); } /* We don't try to recover from errors; just return the original string. */ - fold_storage = gdb::to_string (name); + fold_storage = name; return fold_storage.c_str (); } @@ -1136,12 +1135,12 @@ ada_fold_name (std::string_view name, bool throw_on_error = false) warned = true; warning (_("could not convert the lower-cased variant of '%s'\n" "from UTF-32 to the host encoding (%s)."), - gdb::to_string (name).c_str (), host_charset ()); + std::string (name).c_str (), host_charset ()); } /* We don't try to recover from errors; just return the original string. */ - fold_storage = gdb::to_string (name); + fold_storage = name; } } @@ -13256,11 +13255,9 @@ ada_lookup_name_info::ada_lookup_name_info (const lookup_name_info &lookup_name) if (!user_name.empty () && user_name[0] == '<') { if (user_name.back () == '>') - m_encoded_name - = gdb::to_string (user_name.substr (1, user_name.size () - 2)); + m_encoded_name = user_name.substr (1, user_name.size () - 2); else - m_encoded_name - = gdb::to_string (user_name.substr (1, user_name.size () - 1)); + m_encoded_name = user_name.substr (1, user_name.size () - 1); m_encoded_p = true; m_verbatim_p = true; m_wild_match_p = false; @@ -13277,10 +13274,10 @@ ada_lookup_name_info::ada_lookup_name_info (const lookup_name_info &lookup_name) const char *folded = ada_fold_name (user_name); m_encoded_name = ada_encode_1 (folded, false); if (m_encoded_name.empty ()) - m_encoded_name = gdb::to_string (user_name); + m_encoded_name = user_name; } else - m_encoded_name = gdb::to_string (user_name); + m_encoded_name = user_name; /* Handle the 'package Standard' special case. See description of m_standard_p. */ diff --git a/gdb/amdgpu-tdep.c b/gdb/amdgpu-tdep.c index 58d26fc0b6b..15f32885b07 100644 --- a/gdb/amdgpu-tdep.c +++ b/gdb/amdgpu-tdep.c @@ -27,7 +27,6 @@ #include "frame-unwind.h" #include "gdbarch.h" #include "gdbsupport/selftest.h" -#include "gdbsupport/gdb_string_view.h" #include "gdbtypes.h" #include "inferior.h" #include "objfiles.h" @@ -402,7 +401,7 @@ parse_amd_dbgapi_register_type_enum_fields if (value > std::numeric_limits::max ()) enum_type.set_bit_size (64); - enum_type.add_enumerator (gdb::to_string (name), value); + enum_type.add_enumerator (std::string (name), value); fields = fields.substr (matches[0].rm_eo); } @@ -446,7 +445,7 @@ parse_amd_dbgapi_register_type_flags_fields ULONGEST pos_begin = try_strtoulst (pos_begin_str); if (field_type_str == "bool") - flags_type.add_field (gdb::to_string (field_name), pos_begin, pos_begin, + flags_type.add_field (std::string (field_name), pos_begin, pos_begin, nullptr); else { @@ -457,7 +456,7 @@ parse_amd_dbgapi_register_type_flags_fields ULONGEST pos_end = try_strtoulst (pos_end_str.substr (1)); const amd_dbgapi_register_type &field_type = parse_amd_dbgapi_register_type (field_type_str, type_map); - flags_type.add_field (gdb::to_string (field_name), pos_begin, pos_end, + flags_type.add_field (std::string (field_name), pos_begin, pos_end, &field_type); } @@ -471,7 +470,7 @@ static const amd_dbgapi_register_type & parse_amd_dbgapi_register_type_scalar (std::string_view name, amd_dbgapi_register_type_map &type_map) { - std::string name_str = gdb::to_string (name); + std::string name_str (name); auto it = type_map.find (name_str); if (it != type_map.end ()) { @@ -534,7 +533,7 @@ parse_amd_dbgapi_register_type (std::string_view type_str, std::string_view count_str_view = type_str.substr (pos_open_bracket + 1, pos_close_bracket - pos_open_bracket); - std::string count_str = gdb::to_string (count_str_view); + std::string count_str (count_str_view); unsigned int count = std::stoul (count_str); std::string lookup_name @@ -580,7 +579,7 @@ parse_amd_dbgapi_register_type (std::string_view type_str, /* No braces, lookup existing type. */ if (existing_type_it == type_map.end ()) error (_("reference to unknown type %s."), - gdb::to_string (name).c_str ()); + std::string (name).c_str ()); if (existing_type_it->second->kind () != amd_dbgapi_register_type::kind::FLAGS) @@ -593,7 +592,7 @@ parse_amd_dbgapi_register_type (std::string_view type_str, /* With braces, it's a definition. */ if (existing_type_it != type_map.end ()) error (_("re-definition of type %s."), - gdb::to_string (name).c_str ()); + std::string (name).c_str ()); amd_dbgapi_register_type_flags_up flags_type (new amd_dbgapi_register_type_flags (bit_size, name)); @@ -632,7 +631,7 @@ parse_amd_dbgapi_register_type (std::string_view type_str, /* No braces, lookup existing type. */ if (existing_type_it == type_map.end ()) error (_("reference to unknown type %s"), - gdb::to_string (name).c_str ()); + std::string (name).c_str ()); if (existing_type_it->second->kind () != amd_dbgapi_register_type::kind::ENUM) @@ -645,7 +644,7 @@ parse_amd_dbgapi_register_type (std::string_view type_str, /* With braces, it's a definition. */ if (existing_type_it != type_map.end ()) error (_("re-definition of type %s"), - gdb::to_string (name).c_str ()); + std::string (name).c_str ()); amd_dbgapi_register_type_enum_up enum_type (new amd_dbgapi_register_type_enum (name)); diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index a989eb9cb97..eb88c406ad6 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -20,7 +20,6 @@ #include "diagnostics.h" #include #include "gdbsupport/scoped_fd.h" -#include "gdbsupport/gdb_string_view.h" #include "debuginfod-support.h" #include #include "cli/cli-cmds.h" @@ -265,8 +264,7 @@ debuginfod_is_enabled () gdb_printf (_(" <%ps>\n"), styled_string (file_name_style.style (), - gdb::to_string (url_view.substr (0, - off)).c_str ())); + std::string (url_view.substr (0, off)).c_str ())); if (off == std::string_view::npos) break; url_view = url_view.substr (off); diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index a16139dad1e..ccf9f18b31b 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -96,7 +96,6 @@ #include "split-name.h" #include "gdbsupport/parallel-for.h" #include "gdbsupport/thread-pool.h" -#include "gdbsupport/gdb_string_view.h" /* When == 1, print basic high level tracing messages. When > 1, be more verbose. @@ -16770,7 +16769,7 @@ cooked_index_functions::expand_symtabs_matching { std::vector name_vec = lookup_name_without_params.split_name (lang); - std::string last_name = gdb::to_string (name_vec.back ()); + std::string last_name (name_vec.back ()); for (const cooked_index_entry *entry : table->find (last_name, completing)) diff --git a/gdb/eval.c b/gdb/eval.c index 8664d4980b7..3358b0d8d32 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -37,7 +37,6 @@ #include "user-regs.h" #include "valprint.h" #include "gdbsupport/gdb_obstack.h" -#include "gdbsupport/gdb_string_view.h" #include "objfiles.h" #include "typeprint.h" #include diff --git a/gdb/solib-rocm.c b/gdb/solib-rocm.c index 9ceb7a922e3..0384e52d58a 100644 --- a/gdb/solib-rocm.c +++ b/gdb/solib-rocm.c @@ -31,7 +31,6 @@ #include "solib-svr4.h" #include "solist.h" #include "symfile.h" -#include "gdbsupport/gdb_string_view.h" #include @@ -440,7 +439,7 @@ rocm_bfd_iovec_open (bfd *abfd, inferior *inferior) std::string_view uri (bfd_get_filename (abfd)); std::string_view protocol_delim = "://"; size_t protocol_end = uri.find (protocol_delim); - std::string protocol = gdb::to_string (uri.substr (0, protocol_end)); + std::string protocol (uri.substr (0, protocol_end)); protocol_end += protocol_delim.length (); std::transform (protocol.begin (), protocol.end (), protocol.begin (), @@ -463,7 +462,7 @@ rocm_bfd_iovec_open (bfd *abfd, inferior *inferior) && std::isxdigit (path[i + 2])) { std::string_view hex_digits = path.substr (i + 1, 2); - decoded_path += std::stoi (gdb::to_string (hex_digits), 0, 16); + decoded_path += std::stoi (std::string (hex_digits), 0, 16); i += 2; } else @@ -549,7 +548,7 @@ rocm_bfd_iovec_open (bfd *abfd, inferior *inferior) if (pid != inferior->pid) { warning (_("`%s': code object is from another inferior"), - gdb::to_string (uri).c_str ()); + std::string (uri).c_str ()); bfd_set_error (bfd_error_bad_value); return nullptr; } @@ -566,7 +565,7 @@ rocm_bfd_iovec_open (bfd *abfd, inferior *inferior) } warning (_("`%s': protocol not supported: %s"), - gdb::to_string (uri).c_str (), protocol.c_str ()); + std::string (uri).c_str (), protocol.c_str ()); bfd_set_error (bfd_error_bad_value); return nullptr; }