From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ntX3JlmXR2oZmCMAWB0awg (envelope-from ) for ; Fri, 03 Jul 2026 07:04:57 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=qwiOGA7P; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8F2C01E024; Fri, 03 Jul 2026 07:04:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B715C1E024 for ; Fri, 03 Jul 2026 07:04:56 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5DE404BA2E1D for ; Fri, 3 Jul 2026 11:04:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DE404BA2E1D Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=qwiOGA7P Received: from BL0PR03CU003.outbound.protection.outlook.com (mail-eastusazlp170120007.outbound.protection.outlook.com [IPv6:2a01:111:f403:c101::7]) by sourceware.org (Postfix) with ESMTPS id 5D83C4BA2E0E for ; Fri, 3 Jul 2026 11:04:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D83C4BA2E0E Authentication-Results: sourceware.org; dmarc=pass (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 5D83C4BA2E0E Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c101::7 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1783076668; cv=pass; b=sfoEk9KvPd1tta3RsjjcKPNn9B8oi61tBdW+NTBXb/fzDSnwrFaEuFpBBw79kgxCPu4TQbDDLrmmigCSyF14e32jpsJ2b6Ob6Q3GVFQ9CqTtZK/AyZHrdwROrS3D+k82NHL/ak6DC72zuQf+1KiwMn287FNFauR1gRA+X+zf+L4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1783076668; c=relaxed/simple; bh=wKnvgiuHTFSNSmSVndlsqumdvWf7soK/cqrSDfLtCUM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dNVoNqcScfwki/K2Oy4FKjCuErqDhhcVXtAJRbpjPB9XQK7ty7yPLCyW4EF1dJrxxtdjV/pmgAWK+KAgBrNPLwQmO90EP6rBW9FkTkaWdKbWCgsol2BgJ8WYkG8ivvvHjrzh0OwFYfQk3pIm8VOW4J8zt4bGOPv1zLhM+jRlOnQ= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=qwiOGA7P DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D83C4BA2E0E ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MoGV8VXYc4cc2Mw4EsQLbZUkbFsYoqW3ujCmVQxEzQx46GLMZleiCQ8iMRs6+YEYdv0GsijEgjWBUXoBkPN0X4X4pdkXUjBZPtWVVdaSZW9QekAyJCpm4nhCGaY/pJzOL9cYhUlkBY6XgXUhhnXcpdPW6J/4jKXYqbbwpc4TxmbuH44JzyeAOLY108apZkG4/hIlLACytEf6UHRTLak30C+5liPlpAK3O0TdCpqMTQN2jQXXekxmqjkWTByvaXriJSW05it8VFatV6aWok+vCtbKMk4kG2uFPo9hLTdSJFWEBvdH8jDgSM9GyHDkIIbYaWT8UhXdGXZEfMZH6hLisQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ALhGJzOzfXYOLrrKhSA4nc3WZf2zy+uBLbDwXLKRKYY=; b=fPF0ROTM9F1INie28gYN9Wv8OvUxdFGVj4QEppkdo0RzXPbb+s6KRJkUTspxzr7ag70gxb4w2aAF+OV6sQNNFqQgXN5MJfufZF6GO8Ha7ce2WabAbhu6TWlRHzxrJVjJ2qLiExITddfPHMD4OrzDcATExRyGytRLJcc5s5vZc0Ry3cb4ICBij1yWN+LOVuPxKeNTckxDVoVsO1GZdgN2bNeojIa27zMdQHNeJ3QiLb8w0CeiqoMZTMxGp+cKW/rWt5LqL32KQgOc1R6S8UZ/MIV918Fsm4NIQS/Iq846yKjAzj85HflzFq2pAz7TWieGcLLvQjbse3gUi0BbVlc16w== 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=ALhGJzOzfXYOLrrKhSA4nc3WZf2zy+uBLbDwXLKRKYY=; b=qwiOGA7PHRocFToNRPQv4ijIm0YyVhBflxRdIsuzibciKUYRI2Sks+64udLgcvL4tJRnzzjLp8m96HhzCsT8gArJKlE0zR+kT3UKh9okzyMBBPMNVru1REJ6LKQkhnR2uXKfvXc5FP1Z7LuT5ZkAszhA992xoNB2rS1DJK7tovQ= Received: from DS7P220CA0105.NAMP220.PROD.OUTLOOK.COM (2603:10b6:8:25d::17) by BL3PR12MB6618.namprd12.prod.outlook.com (2603:10b6:208:38d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.9; Fri, 3 Jul 2026 11:04:22 +0000 Received: from SA2PEPF000015C6.namprd03.prod.outlook.com (2603:10b6:8:25d:cafe::22) by DS7P220CA0105.outlook.office365.com (2603:10b6:8:25d::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.181.11 via Frontend Transport; Fri, 3 Jul 2026 11:04:22 +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=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by SA2PEPF000015C6.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.6 via Frontend Transport; Fri, 3 Jul 2026 11:04:22 +0000 Received: from ctr-rack32-mi300x-1.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 3 Jul 2026 06:04:22 -0500 From: Tankut Baris Aktemur To: CC: Subject: [PATCH v2] gdb, amd-dbgapi-target: use pulongest to print id handles Date: Fri, 3 Jul 2026 06:03:53 -0500 Message-ID: <20260703110353.1635073-1-tankutbaris.aktemur@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260701142846.2566570-1-tankutbaris.aktemur@amd.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015C6:EE_|BL3PR12MB6618:EE_ X-MS-Office365-Filtering-Correlation-Id: cc249985-23f2-44b4-1f8e-08ded8f2d687 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|23010399003|82310400026|36860700016|376014|11063799006|56012099006|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: pZLyBC9ehkbn93OPSTi67Ep0YHlCoTZOTK8fxdsbD0L/Rc7KAPASmZDkCbSqaZazxjPno0v5c3hEGf3dh+39G28Z9kDxH1x3NUIOE01TrfDoWx+X1x8IMrstIRGiz14FXdtwSAshrOVWgd/jZpBB2lSb8atT/YxnKZ8622LvEEV/h3SRERJikxY2ARgSWpHZwJY6ur4yw1glNL58WxEkhmLS8BegB5BmN7Qknht1PwnHukqOXQ2OuIGyM6tJ55f08DPbNOv2pYbmYp0y2wQnYqG7hGuxdOeorosTJELwNpa8yHUr/GUoDhzkcKneyz169j6kJncnxcLuKaOmAhiafGjVJ1R+Ik/aqbIa99/Vhd31i83sGmHq2r27aGvmGmDOXGEXqG4kXBtEnPd+wSEpYAiMONVsQPFqre8jc48gG2+YcHpQmDGyR6OynX1fggIPJwMdjg/b+8AP929AVf8n1Gaz5vVqUxH349VbQi7RT0uLd1YFhrrfSgZZCTh0/t+QKxWfcm6sK12z7kjaOwmk2AeGhHh2cn+e8UdFRQvaIlSHhqYOiH7Mdfj+oLnP9lY/HKqJw7bXks+mWU1d0l0sQW4KvQcyL0Ui2MqHRYI83y0XRx1/5DgZqYZv50m2ok9R/yYhqr2InY+h+wOSckmcCvVY4kdvosKoSY3F/CXX/+MzfENFF+aVREK5MsIwQHwoGG9So76cAU7lz/xmRCA71w== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(23010399003)(82310400026)(36860700016)(376014)(11063799006)(56012099006)(18002099003)(22082099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: czEtc05v09bG4tj3pW7Hj4cM0i8JZ2a5PFASYSY8+8WOoKcSIe5spJ3M8Ntg9SoLp4P8/KsXVWTL1QrWRY/w3SW1ImEOdgMNDJM79Nxpo/xtcRtsSTohL2AYI217lxfgYU1OYdWSqJ0VqC8cL535+Zc/APWKbEX1Y74pF6m/BfjBACOLu/dx0THacprZsjqcYyfAHbHt5JCpy5unZ0YbDEv1FxwJLMzq6JpoNLeaaP+ytwe04qfscTErcisru7rYBxI3QBdoWg3eTamHXAqatZk+1RLxN+XOmKxAgHz6oVEbqUdwddGq+QRmBvlQHEVXDN+sObP/Dy/OhRw8BXBwnNILwZo/JDA+d9hTLULu+AWX+YjMGlmyS2MwkYs5vLx5fYy0y8CdMZnXYthY+q6oDQckswwCgBfnaJhe1ptRf4qjU1vu0eVYcK576r45lBRk X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2026 11:04:22.5724 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc249985-23f2-44b4-1f8e-08ded8f2d687 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015C6.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6618 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~public-inbox=simark.ca@sourceware.org In amd-dbgapi-target, there are a number of cases where identifier handles that are obtained from dbgapi are being printed. Those handles are defined to have type uint64_t. Use pulongest when printing them for improved portability. In one case, `ptid.tid ()` was being printed for the wave id. Change this to use `wave_id.handle` for consistency with the other cases. --- gdb/amd-dbgapi-target.c | 87 +++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c index d0424044e0c..caae9a98501 100644 --- a/gdb/amd-dbgapi-target.c +++ b/gdb/amd-dbgapi-target.c @@ -392,18 +392,18 @@ wave_coordinates::to_string () const std::string str = "AMDGPU Wave"; str += (agent_id != AMD_DBGAPI_AGENT_NONE - ? string_printf (" %ld", agent_id.handle) + ? string_printf (" %s", pulongest (agent_id.handle)) : " ?"); str += (queue_id != AMD_DBGAPI_QUEUE_NONE - ? string_printf (":%ld", queue_id.handle) + ? string_printf (":%s", pulongest (queue_id.handle)) : ":?"); str += (dispatch_id != AMD_DBGAPI_DISPATCH_NONE - ? string_printf (":%ld", dispatch_id.handle) + ? string_printf (":%s", pulongest (dispatch_id.handle)) : ":?"); - str += string_printf (":%ld", wave_id.handle); + str += string_printf (":%s", pulongest (wave_id.handle)); str += (group_ids[0] != UINT32_MAX ? string_printf (" (%d,%d,%d)", group_ids[0], group_ids[1], @@ -591,9 +591,10 @@ amd_dbgapi_target_breakpoint::check_status (struct bpstat *bs) &action); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_("amd_dbgapi_report_breakpoint_hit failed for breakpoint %ld " + error (_("amd_dbgapi_report_breakpoint_hit failed for breakpoint %s " "at %s (%s)"), - breakpoint_id.handle, paddress (inf->arch (), bs->bp_location_at->address), + pulongest (breakpoint_id.handle), + paddress (inf->arch (), bs->bp_location_at->address), get_status_string (status)); if (action == AMD_DBGAPI_BREAKPOINT_ACTION_RESUME) @@ -624,8 +625,9 @@ amd_dbgapi_target_breakpoint::check_status (struct bpstat *bs) for our breakpoint_id. */ if (resume_breakpoint_id != breakpoint_id) error (_("breakpoint resume event is not for this breakpoint. " - "Expected breakpoint_%ld, got breakpoint_%ld"), - breakpoint_id.handle, resume_breakpoint_id.handle); + "Expected breakpoint_%s, got breakpoint_%s"), + pulongest (breakpoint_id.handle), + pulongest (resume_breakpoint_id.handle)); amd_dbgapi_event_processed (resume_event_id); } @@ -1055,8 +1057,8 @@ amd_dbgapi_target::resume (ptid_t scope_ptid, int step, enum gdb_signal signo) indicate that the process has exited. GDB treats resuming a thread that no longer exists as being successful. */ && status != AMD_DBGAPI_STATUS_ERROR_INVALID_WAVE_ID) - error (_("wave_resume for wave_%ld failed (%s)"), wave_id.handle, - get_status_string (status)); + error (_("wave_resume for wave_%s failed (%s)"), + pulongest (wave_id.handle), get_status_string (status)); wi.stopping = false; } @@ -1130,12 +1132,12 @@ amd_dbgapi_target::stop (ptid_t ptid) } if (status != AMD_DBGAPI_STATUS_ERROR_INVALID_WAVE_ID) - error (_("wave_stop for wave_%ld failed (%s)"), wave_id.handle, - get_status_string (status)); + error (_("wave_stop for wave_%s failed (%s)"), + pulongest (wave_id.handle), get_status_string (status)); } else if (status != AMD_DBGAPI_STATUS_ERROR_INVALID_WAVE_ID) - error (_("wave_get_info for wave_%ld failed (%s)"), wave_id.handle, - get_status_string (status)); + error (_("wave_get_info for wave_%s failed (%s)"), + pulongest (wave_id.handle), get_status_string (status)); /* The status is AMD_DBGAPI_STATUS_ERROR_INVALID_WAVE_ID. The wave could have terminated since the last time the wave list was @@ -1145,9 +1147,9 @@ amd_dbgapi_target::stop (ptid_t ptid) wi.stopping = true; amd_dbgapi_debug_printf ("got AMD_DBGAPI_STATUS_ERROR_INVALID_WAVE_ID " - "for wave_%ld, last_resume_mode=%s, " + "for wave_%s, last_resume_mode=%s, " "report_thread_events=%d", - wave_id.handle, + pulongest (wave_id.handle), resume_mode_to_string (wi.last_resume_mode), m_report_thread_events); @@ -1212,8 +1214,8 @@ struct scoped_amd_dbgapi_event_processed { amd_dbgapi_status_t status = amd_dbgapi_event_processed (m_event_id); if (status != AMD_DBGAPI_STATUS_SUCCESS) - warning (_("Failed to acknowledge amd-dbgapi event %" PRIu64), - m_event_id.handle); + warning (_("Failed to acknowledge amd-dbgapi event %s"), + pulongest (m_event_id.handle)); } DISABLE_COPY_AND_ASSIGN (scoped_amd_dbgapi_event_processed); @@ -1268,8 +1270,8 @@ dbgapi_notifier_handler (int err, gdb_client_data client_data) sizeof (runtime_state), &runtime_state); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_("event_get_info for event_%ld failed (%s)"), - event_id.handle, get_status_string (status)); + error (_("event_get_info for event_%s failed (%s)"), + pulongest (event_id.handle), get_status_string (status)); switch (runtime_state) { @@ -1404,7 +1406,7 @@ add_gpu_thread (inferior *inf, ptid_t wave_ptid) if (!info.wave_info_map.try_emplace (wave_id.handle, wave_info (wave_id)).second) - internal_error ("wave ID %ld already in map", wave_id.handle); + internal_error ("wave ID %s already in map", pulongest (wave_id.handle)); /* Create new GPU threads silently to avoid spamming the terminal with thousands of "[New Thread ...]" messages. */ @@ -1436,8 +1438,8 @@ process_one_event (amd_dbgapi_inferior_info &info, = amd_dbgapi_event_get_info (event_id, AMD_DBGAPI_EVENT_INFO_WAVE, sizeof (wave_id), &wave_id); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_("event_get_info for event_%ld failed (%s)"), - event_id.handle, get_status_string (status)); + error (_("event_get_info for event_%s failed (%s)"), + pulongest (event_id.handle), get_status_string (status)); ptid_t event_ptid = make_gpu_ptid (info.inf->pid, wave_id); target_waitstatus ws; @@ -1502,8 +1504,8 @@ process_one_event (amd_dbgapi_inferior_info &info, } } else - error (_("wave_get_info for wave_%ld failed (%s)"), - wave_id.handle, get_status_string (status)); + error (_("wave_get_info for wave_%s failed (%s)"), + pulongest (wave_id.handle), get_status_string (status)); info.wave_events.emplace_back (event_ptid, ws); break; @@ -1542,8 +1544,8 @@ process_one_event (amd_dbgapi_inferior_info &info, AMD_DBGAPI_EVENT_INFO_RUNTIME_STATE, sizeof (runtime_state), &runtime_state); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_("event_get_info for event_%ld failed (%s)"), - event_id.handle, get_status_string (status)); + error (_("event_get_info for event_%s failed (%s)"), + pulongest (event_id.handle), get_status_string (status)); gdb_assert (runtime_state == AMD_DBGAPI_RUNTIME_STATE_UNLOADED); gdb_assert @@ -1620,9 +1622,9 @@ process_event_queue (amd_dbgapi_inferior_info &info, if (event_kind != AMD_DBGAPI_EVENT_KIND_NONE) amd_dbgapi_debug_printf ("Pulled event from dbgapi: " - "event_id.handle = %" PRIu64 ", " + "event_id.handle = %s, " "event_kind = %s", - event_id.handle, + pulongest (event_id.handle), event_kind_str (event_kind)); if (event_id == AMD_DBGAPI_EVENT_NONE || event_kind == until_event_kind) @@ -1860,8 +1862,8 @@ attach_amd_dbgapi (inferior *inf) /* Are we already attached? */ if (info.process_id != AMD_DBGAPI_PROCESS_NONE) { - amd_dbgapi_debug_printf - ("already attached: process_id = %" PRIu64, info.process_id.handle); + amd_dbgapi_debug_printf ("already attached: process_id = %s", + pulongest (info.process_id.handle)); return; } @@ -1895,8 +1897,8 @@ attach_amd_dbgapi (inferior *inf) return; } - amd_dbgapi_debug_printf ("process_id = %" PRIu64 ", notifier fd = %d", - info.process_id.handle, + amd_dbgapi_debug_printf ("process_id = %s, notifier fd = %d", + pulongest (info.process_id.handle), amd_dbgapi_notifier_get_fd (info.notifier)); set_process_memory_precision (info); @@ -2069,15 +2071,16 @@ amd_dbgapi_target::thread_architecture (ptid_t ptid) sizeof (architecture_id), &architecture_id); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_("Couldn't get architecture for wave_%ld"), ptid.tid ()); + error (_("Couldn't get architecture for wave_%s"), + pulongest (wave_id.handle)); uint32_t elf_amdgpu_machine; status = amd_dbgapi_architecture_get_info (architecture_id, AMD_DBGAPI_ARCHITECTURE_INFO_ELF_AMDGPU_MACHINE, sizeof (elf_amdgpu_machine), &elf_amdgpu_machine); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_("Couldn't get elf_amdgpu_machine for architecture_%ld"), - architecture_id.handle); + error (_("Couldn't get elf_amdgpu_machine for architecture_%s"), + pulongest (architecture_id.handle)); struct gdbarch_info info; info.bfd_arch_info = bfd_lookup_arch (bfd_arch_amdgcn, elf_amdgpu_machine); @@ -2154,16 +2157,16 @@ amd_dbgapi_target::update_thread_list () || wi.stopping) { amd_dbgapi_debug_printf - ("wave_%ld disappeared, keeping it" + ("wave_%s disappeared, keeping it" " (last_resume_mode=%s, stopping=%d)", - wave_id.handle, + pulongest (wave_id.handle), resume_mode_to_string (wi.last_resume_mode), wi.stopping); } else { - amd_dbgapi_debug_printf ("wave_%ld disappeared, deleting it", - wave_id.handle); + amd_dbgapi_debug_printf ("wave_%s disappeared, deleting it", + pulongest (wave_id.handle)); delete_thread_silent (&tp); } } @@ -2283,8 +2286,8 @@ amd_dbgapi_target::displaced_step_finish (thread_info *thread, sizeof (stop_reason), &stop_reason); if (status != AMD_DBGAPI_STATUS_SUCCESS) - error (_("wave_get_info for wave_%ld failed (%s)"), wave_id.handle, - get_status_string (status)); + error (_("wave_get_info for wave_%s failed (%s)"), + pulongest (wave_id.handle), get_status_string (status)); status = amd_dbgapi_displaced_stepping_complete (wave_id, stepping_id); -- 2.34.1