From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sLPgILUKEGE4JwAAWB0awg (envelope-from ) for ; Sun, 08 Aug 2021 12:47:49 -0400 Received: by simark.ca (Postfix, from userid 112) id 759C31EDF7; Sun, 8 Aug 2021 12:47:49 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6BD931E79C for ; Sun, 8 Aug 2021 12:47:48 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EDD3E3890023 for ; Sun, 8 Aug 2021 16:47:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDD3E3890023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628441268; bh=b5/VsZqPg8TTWAW+Ex7R9D8Vwd4Nl3eP/GWMHd5FSwo=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=BOL81Iy/G8mKzF61jTsJ6lCxkmUYe1wjibuob4I/g3lAdOGJ1GQR9Mq7t6fWS9/MH uRs9nJ7UH155G00f0tawLifikV67G+HbskAAQL1XWU5iHfhEE6Bsf+6diFtwyoWsa7 543ZSFKr8Ma8vZQOyAi21L0Tkz2KlYAsccY7zWFM= Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 21EC73853816 for ; Sun, 8 Aug 2021 16:47:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 21EC73853816 Received: by mail-pl1-x634.google.com with SMTP id t3so13845159plg.9 for ; Sun, 08 Aug 2021 09:47:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=b5/VsZqPg8TTWAW+Ex7R9D8Vwd4Nl3eP/GWMHd5FSwo=; b=JBKOgwPXkW8RPwfQnb/YJFyr1KaU0qkVToPHBGcaRkrv4y8nQugPhWm0+1OMZyY9ra IXU/N5gQdOXezjZ+hrFMmIJ7pxb4Hiwna2rdSy1jaddMiJSl1+4p8xdAIT6AoNJzDduH mG2yizdajfVoldYoolV3dg3oag4zJuuE8DTIRxAPqqYWmlzhvpmIZfvifLrRhA1tvnS5 lh4p6CRIs5iZ6bSlcu2l87Yvn0aUkR72pu+KKtrl1HWcmT+bNarQcM6Xnceft223o+Pp zKN0ciRtLzEREDCAhIVOef8D/dh8h7fwcH6gLgzJxQB8yDY3UHzwrDsstEmOSRX+RUrT u4IQ== X-Gm-Message-State: AOAM533wVdJ3iXPk1cIs/usmkXRyT4+CrUv3afBLCQwo+wWDiYjqpFz2 Ccy7u9efnU2zEbn+j49i7FhP3fm+OR5JBFG4KiM= X-Google-Smtp-Source: ABdhPJyxGaqf2HCiTJ62c4gTngQzvUe0DNU0lUi4XvuGoaLaDROcu/n+zRJU5J7vpF3TcYenaAtURcvp8fwGeyA15Lk= X-Received: by 2002:a63:5252:: with SMTP id s18mr241272pgl.94.1628441242351; Sun, 08 Aug 2021 09:47:22 -0700 (PDT) MIME-Version: 1.0 References: <767694398.211875.1628429913388.ref@mail.yahoo.com> <767694398.211875.1628429913388@mail.yahoo.com> <83k0kwgg2s.fsf@gnu.org> <863850548.219085.1628435181352@mail.yahoo.com> <877dgwc5qv.fsf@igel.home> <569018761.219127.1628438476158@mail.yahoo.com> <2120078511.233484.1628440503952@mail.yahoo.com> In-Reply-To: <2120078511.233484.1628440503952@mail.yahoo.com> Date: Sun, 8 Aug 2021 12:45:00 -0400 Message-ID: Subject: Re: Error "No source file named" To: Mahmood Naderan Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeffrey Walton via Gdb Reply-To: noloader@gmail.com Cc: Mahmood Naderan via Gdb , Andreas Schwab Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Sun, Aug 8, 2021 at 12:35 PM Mahmood Naderan via Gdb wrote: > > >Could you have two copies of shader.o hanging about? > > Jonah, Thanks for the tip. I checked more and see > > > g++ -g3 -fPIC -DCUDART_VERSION=11020 -Wall -DDEBUG -DTRACING_ON=1 -std=c++0x -ggdb \ > -I/usr/local/cuda-11.2/include -I/home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/src/gpuwattch/ \ > -DGPGPUSIM_POWER_MODEL -o /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/shader.o \ > -c shader.cc > > > ar rcs /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/libgpu_uarch_sim.a \ > /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/shader.o \ > ... > > > g++ -shared -Wl,-soname,libcudart.so -Wl,--version-script=linux-so-version.txt \ > ... > /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/*.o \ > -o lib/gcc-9.3.0/cuda-11020/debug/libcudart.so > > > > > > And the final binary depends on the libcudart.so > > $ ldd gpu-simulator/bin/debug/accel-sim.out > linux-vdso.so.1 (0x00007fffc01c3000) > libcudart.so => /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/lib/gcc-9.3.0/cuda-11020/debug/libcudart.so (0x00007f7c3e8f4000) > libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7c3e6f0000) > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7c3e6d5000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7c3e6b2000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7c3e4c0000) > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7c3e4a2000) > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7c3e353000) > /lib64/ld-linux-x86-64.so.2 (0x00007f7c3f2dc000) > > Do you also confirm that shader.cc symbols must be in the final binary? You might also find -fdebug-prefix-map useful. It allows you to tell the debugger where to locate source files for object files if the source files have been relocated to a directory like /lib/src. It may help here, too. Jeff