This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Insight exits abrupt when trying to view in ASM or MIXED mode.


Paul_Heijman@eu.omron.com wrote:
> 
> >When you say that you load the ".cof" file, are you loading symbols only
> >or the executable with symbols? (Are you using Insight's
> >File->Open/console window's "file" command or using the console command
> >"add-symbol-file"?)
> 
> I load the symbol file from the commandline:
> GDB --baud=38400 -d=//O/Alt/Fwk/new/src -s=//O/Alt/Fwk/new/bin/framewrk.cof
> -readnow
> 
> The .cof file contains code information and also the symbol table.

The file may contain code and symbols, but using "-s=..." will cause gdb
to ONLY read symbols. This is why gdbtk was failing to disassemble
anything.

> The cases that I tried were when connected to the target. When not connected, i
> don't manage to see any code, source nor assembly.

It would make sense that you could not disassemble (and maybe even not
see source). Like I said before, if you are not attached to a remote
target, gdb (and gdbtk) will look at the code you've loaded to do
disassembly. Since you didn't load any code, gdb couldn't show you
anything.

> I can look to the assembly code now, like you said I opened the cof-file
> manually with File->Open.
> After I connected to the target I could see the ASM-source!

Cool! Not bad for my first guess. :-)

> 
> Does this mean it will never work through the commandline ?
> I also didn't provide the source-path in the commandline, so at the moment I
> don't see the C-source.
> 

No, you should be able to invoke gdb/Insight passing the file on the
command line:
$ gdb [args, sans the -s one] myExecutable.cof

In general, the use of "add-symbol-file" and the "-s" command line flag
should be used to read ADDITIONAL symbols into gdb. (Purists will say
that this is not true, and they are correct. However, my experience with
gdb, this advice has never failed.)

Keith
-- 
Why chat when you can Firetalk?
Firetalk ID: Keith (10320)
www.firetalk.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]