From: Michael Snyder <msnyder@vmware.com>
To: 陳韋任 <chenwj@iis.sinica.edu.tw>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: How to run gdb with LD_PRELOAD?
Date: Sat, 15 Jan 2011 23:16:00 -0000 [thread overview]
Message-ID: <4D322AC5.2020509@vmware.com> (raw)
In-Reply-To: <20110115144525.GD44658@cs.nctu.edu.tw>
é³éä»» wrote:
> Hi, all
>
> I have a program using LD_PRELOAD. The program should be run like
> this, "LD_PRELOAD=/path/to/libfoo.so qemu -U LD_PRELOAD a.out", if
> without gdb.
>
> Here are what I did while running gdb.
>
> --------------------------------------------------------------------
> $ gdb
> (gdb) set environment LD_PRELOAD=/path/to/libfoo.so
> (gdb) file qemu
> (gdb) r -U LD_PRELOAD a.out
> --------------------------------------------------------------------
>
> But gdb gave me the error below,
>
> ERROR: ld.so: object '/nfs_home/chenwj/lib/libdbo.so' from LD_PRELOAD cannot be preloaded: ignored.
>
> Any suggestion appreciated.
I would think it should be
(gdb) set environment LD_PRELOAD=/path/to/libfoo.so qemu -U LD_PRELOAD
(gdb) run
next prev parent reply other threads:[~2011-01-15 23:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-15 14:45 陳韋任
2011-01-15 23:16 ` Michael Snyder [this message]
2011-01-16 2:56 ` 陳韋任
2011-01-16 8:01 ` Philippe Waroquiers
2011-01-16 8:04 ` 陳韋任
2011-01-16 0:52 ` Hui Zhu
2011-01-16 2:58 ` 陳韋任
2011-01-16 8:01 ` 陳韋任
2011-01-20 7:22 ` 陳韋任
2011-01-20 7:35 ` Pedro Alves
2011-01-20 9:29 ` 陳韋任
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=4D322AC5.2020509@vmware.com \
--to=msnyder@vmware.com \
--cc=chenwj@iis.sinica.edu.tw \
--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