public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mahmood Naderan <nt_mahmood@yahoo.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Running GDB with args and variables
Date: Fri, 27 Aug 2021 18:28:11 +0000 (UTC)	[thread overview]
Message-ID: <1367979679.9898.1630088891149@mail.yahoo.com> (raw)
In-Reply-To: <1367979679.9898.1630088891149.ref@mail.yahoo.com>

Hi

I use the following command to run a program

$ LD_PRELOAD=/home/mahmood/foo.so /home/mahmood/program/run /home/mahmood/p2/bin/p2 -config t.txt

Now I want to use 'gdb --args' but the following command doesn't work.


$ gdb --args LD_PRELOAD=/home/mahmood/foo.so /home/mahmood/program/run /home/mahmood/p2/bin/p2 -config t.txt
...

For help, type "help".
Type "apropos word" to search for commands related to "word"...
LD_PRELOAD=/home/mahmood/foo.so: No such file or directory.
(gdb)




The "No such file" error is weird because the file exists when I run 'ls' command.

Any idea about that?

Regards,
Mahmood

       reply	other threads:[~2021-08-27 18:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1367979679.9898.1630088891149.ref@mail.yahoo.com>
2021-08-27 18:28 ` Mahmood Naderan [this message]
2021-08-30 15:56   ` Christian Biesinger
2021-08-30 16:13     ` Luke Drummond
2021-08-30 17:18       ` Mahmood Naderan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1367979679.9898.1630088891149@mail.yahoo.com \
    --to=nt_mahmood@yahoo.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).