This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: showing the gdb commands executed by insight ?
- From: Keith Seitz <keiths at redhat dot com>
- To: Jim Sullivan <jamessul at cisco dot com>
- Cc: "insight at sources dot redhat dot com" <insight at sources dot redhat dot com>
- Date: Fri, 14 Jan 2005 09:11:50 -0800
- Subject: Re: showing the gdb commands executed by insight ?
- References: <1105720744.5197.13.camel@fr-f1-c1-clnx>
On Fri, 2005-01-14 at 08:39, Jim Sullivan wrote:
> If I run insight and give it a symbol file
> I can disassemble the code and it works correctly.
Sometimes.
> If I run with straight gdb I can not get it to work.
> (i.e. it shows code but it does not look correct.)
If you post your procedure, target, host, etc, I might be able to help.
> Is there a way to run insight such that the
> gdb commands that are executed are displayed ?
> This would allow me to see the sequence of commands
> I need to use with GDB to get this to work.
The majority of insight does not work that way. Unlike DDD, eclipse and
other separate-process debuggers built with gdb, Insight *is* gdb: they
are the same process. Many insight functions (including all the
disassembly) make gdb pseudo-API calls.
If you're using a remote target, I'll bet it appears to work because
insight always disassembles from the image file (as I recall). Gdb, on
the other hand, will disassemble from memory, so if you haven't loaded
an image onto your target, you're going to get gibberish.
You should be able to get gdb to behave similarly by using:
(gdb) help set trust-readonly-sections
Set mode for reading from readonly sections.
When this mode is on, memory reads from readonly sections (such as
.text)
will be read from the object file instead of from the target. This will
result in significant performance improvement for remote targets.
Keith