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 ?
On Fri, 2005-01-14 at 11:56, Jim Sullivan wrote:
> 1. startup insight with the symbol file in the same directory.
You can disassemble here with either gdb or insight: both will
disassemble from your image file.
> 2. set the target setting to remote serial, or remote tcp ...etc.
> 3. connect to the target
As soon as you connect to the target, gdb will disassemble from memory.
To force it to disassemble from the file (as insight does), set
trust-readonly-sections. [I think: it has been quite some time since I
used a remote w/gdb or insight.]
> I can also disassem code after step 1 above, which implies
> that I do not have to be connected to the target to read
> the code. I would guess that insight looks at the symbol
> file, and object file to dump this information.
Right.
> Now if I wanted to do the same thing using GDB.
> I.e. disassem the code without connecting to the target
> I would think that I need only provide a symbol file
> and the location of the source, however your previous
> response implies it is more involved that this.
I would have thought that just setting "trust-readonly-sections" would
do it, but I am mistaken. Something else is amiss. You should send a
sessions transcript to the gdb folks. They'll be able to help you much
more quickly and authoritatively than I can.
> > Sometimes.
>
> Can you explain ?
For a few commands, insight does use vanilla gdb commands, just as if it
were typed by a user. However, the majority of insight functionality,
particularly source file handling, disassembly, and memory/stack
frame/variable inspection all use APIs (as far as they exist). There is
no human typable command behind those calls.
> This would seem to explain it, but using
> set trust-readonly-sections did not solve the problem.
Again, you're best bet now is to contact the experts.
Keith