From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> Reply-To: noloader@gmail.com From: Jeffrey Walton Date: Sun, 8 Aug 2021 12:45:00 -0400 Message-ID: Subject: Re: Error "No source file named" To: Mahmood Naderan Cc: Jonah Graham , Mahmood Naderan via Gdb , Andreas Schwab Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Sun, 08 Aug 2021 16:47:24 -0000 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