From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: 高国胜 <guosheng_gao@realsil.com.cn>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>,
Phil Muldoon <pmuldoon@redhat.com>
Subject: Re: How to use compile & execute function in GDB
Date: Wed, 15 Apr 2015 15:48:00 -0000 [thread overview]
Message-ID: <20150415154836.GA10538@host1.jankratochvil.net> (raw)
In-Reply-To: <0CEE46EB9C50E44486A861D738D3E20645F9C073@rsex2.realsil.com.cn>
On Wed, 15 Apr 2015 07:45:19 +0200, é«å½è wrote:
> I have install gcc-5.0, and copy libcc1.so to current work space.
GDB apparently found libcc1.so but the gcc commmand GDB found is not gcc-5.0,
otherwise it would not complain for '-std=gnu11' etc.
GDB does not search for 'cc' or 'gcc', it uses more complicated pattern:
https://sourceware.org/gdb/current/onlinedocs/gdb/Compiling-and-Injecting-Code.html#Compiling-and-Injecting-Code
17.7.3 Compiler search for the compile command
For example on my system it found (not easy to find out, used 'strace -f -p'
for running GDB during the 'compile code' command):
/usr/lib64/ccache/x86_64-redhat-linux-gcc
I will add there some debug output + filename-enforcing commands.
Thanks for testing compile,
Jan
next prev parent reply other threads:[~2015-04-15 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 5:45 高国胜
2015-04-15 15:48 ` Jan Kratochvil [this message]
[not found] ` <0CEE46EB9C50E44486A861D738D3E20645F9C2E0@rsex2.realsil.com.cn>
2015-04-16 11:34 ` 答复: " Jan Kratochvil
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=20150415154836.GA10538@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=guosheng_gao@realsil.com.cn \
--cc=pmuldoon@redhat.com \
/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).