From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id l/KjJ/nVPWbtygwAWB0awg (envelope-from ) for ; Fri, 10 May 2024 04:08:25 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tVh3ptUy; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9182F1E0C1; Fri, 10 May 2024 04:08:25 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 7B63F1E030 for ; Fri, 10 May 2024 04:08:23 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B7AAB3849AD0 for ; Fri, 10 May 2024 08:08:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7AAB3849AD0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715328502; bh=QuSF3gw4soW1ulLbDyPCOmiFAKKROWG+Sb03faRnOXI=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tVh3ptUyLjtXuxsdeVZKYo0C50Ns2qvc/AUoEyWi+l2ghVIimOvDpdFYDpHHb92Yl RYC9kbS1R8dNtkPIAr07fRTrGDQOo/mM4pI9XKYC75NKX7Fc4ByrDAoATkj5wGh1Cy 8I9zSKX1NTUx4ttva8yPSMLkPIqriZCarhFd1Ttk= Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id ED673384CBA1 for ; Fri, 10 May 2024 08:07:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED673384CBA1 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ED673384CBA1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715328449; cv=none; b=EVYPp8/n8M24sNNom6b2K/oEZlkCv33m8chbjGknWFNHhBc/+4yiji0LWFycP1y0q2LMNF8wFwg7tIsm3PSbYOwPXtre0WxWEx3TMckrlXx4zFTaazuEg6hxFF2IvFG0VNU9wVoTr8dnhA252tZhcb7ap1rfOvvdD5BRWg38noY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715328449; c=relaxed/simple; bh=wWwfKy/IIKc1Wxk+SEcjcm0dMw6d+156zvizL4RPbQI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=e+KUeGfctq1xDbnEMX3GtaLv/0X1lzrkL7Oa/7Xu5W8j/fu+1SZa33W8wwsGOMrVPR1kOIny3FYk1DfK8a2tM089N4lYYWoWslHzcTvAc8sGd/4lN4IfRHsr0RPzS0LO02NLjb5cnyRRim+i5N+MZqCZ2Sp3ldkpdPZ0+T3svb0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-23e94f0788aso854721fac.2 for ; Fri, 10 May 2024 01:07:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715328447; x=1715933247; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QuSF3gw4soW1ulLbDyPCOmiFAKKROWG+Sb03faRnOXI=; b=sJJiAwZc3wTkylJ3p52miswJ/bTWR3L62NTNFORtFpiDB2VdhdW9Et1pb68edjcGhT 0MdxCdBRePy7441St0NeD2MTNIIYoW2YnX3eHrjDWUNL5VI0GvqvGUcsf1JpEOPRR3vj 2leD7R1Ow2MYLJNI1wl8d/ES/bvyHFQ3sbZT/MEtoXaUyUdSnDG0S2pph1OvzxpAZTVw 3gq2nT+IlOarCXEobSGQZ03WFIhGAtAOqxkhMTx2sk0XaJtRRGLn98zLdf5FWsnKNCnt Mw2oWvGshRhqIM2p+quEJsMfZjnnLjgtbdGQMwpT+R8vn/qkQlV95i79Ota6dlO740/P nZUg== X-Gm-Message-State: AOJu0YzW27pdGa9vGirOSAG8y2pNXnguAdddmlWt89S73kgf6S5f1gym CXI5L5Qz3xeCF//DwPR1QO1TQSuLBYeDSv54JYsnxh/lhTarZrm2f8B8mTfZpk+jxELhbi04AP/ GAaRyERZutBsEV93mjm4zTjtQenWLyS1I X-Google-Smtp-Source: AGHT+IFyhE5rfphPg4fSiMv6cQt2Q00NfDSHVOun54Vryiqm6of4gVZUXNiTxw+o37mckbPePQxeL3TvoKq0kM9Bjfo= X-Received: by 2002:a05:6870:8189:b0:23f:d8e:292d with SMTP id 586e51a60fabf-24172f9a7dbmr2164072fac.58.1715328446766; Fri, 10 May 2024 01:07:26 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 10 May 2024 13:37:15 +0530 Message-ID: Subject: Error record and replay target doesn't support syscall number 435 To: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Navin P via Gdb Reply-To: Navin P Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Hi, I tried to record a program calling C++ threads and then did a break on main , then record and continue it throws the error message "record and replay target doesn't support syscall number 435" . What should I do to support syscall number 435 ? I was thinking of adding amd64_sys_clone3 = 435 to amd64-linux-tdep.h In amd64-linux-tdep.c add case amd64_sys_clone3: return gdb_sys_clone3; In linux-record.h gdb_sys_clone3=541 in enum gdb_syscall In linux-record.c case gdb_sys_clone3=break; Is it necessary to do the record_mem_at_reg for clone3 ? Why isn't it done for clone ? Below is gdb log and after that is source code gdb ./a.out GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./a.out... (gdb) b main Breakpoint 1 at 0x134b: file race1.cpp, line 30. (gdb) r Starting program: /home/navin/cpp/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, main () at race1.cpp:30 30 int main(){ (gdb) record full (gdb) c Continuing. Process record and replay target doesn't support syscall number 435 Process record: failed to record execution log. Program stopped. clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:60 60 ../sysdeps/unix/sysv/linux/x86_64/clone3.S: No such file or directory. (gdb) shell uname -a Linux Navin-acer-5740 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux (gdb) shell cat /etc/lsb-release DISTRIB_ID=LinuxMint DISTRIB_RELEASE=21.2 DISTRIB_CODENAME=victoria DISTRIB_DESCRIPTION="Linux Mint 21.2 Victoria" (gdb) Source Code #include #include using namespace std; int g=0; int *p=&g; bool run=true; void t1() { while(run) { g++; if(g==16) p=nullptr; } } void t2() { int z; while(run) { g--; z=*p+1; } } int main(){ thread x1{t1}; thread x2{t2}; sleep(5); run=false; x1.join(); x2.join(); cout <