This is the mail archive of the insight@sourceware.org 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]
Other format: [Raw text]

Re: Insight not configured correctly?


Petrangelo, Jeanne wrote:
... then found several executables in ppc_insight/bin including
"powerpc-linux-insight" which I ran as:
  powerpc-linux-insight -x ~/gdbcmd/<config file>

Lo and behold, an X window opened with "Source Window" in the title bar,
and what looks to be the code I expect to see, although it's in assembly
instead of C source. I see a drop down box in the upper right corner
that lets me switch from Assembly to Source except it only ever shows
assembly and will not show me source.  Is this another configuration
problem?

That usually means that Insight cannot find the source code. This is caused by any of the following:


o Executable not built with "-g" (i.e., no debug info)
o The compilation dir in the debug info for the file is relative,
   and gdb doesn't know where to start looking

The solution to the first problem is to rebuild your executable with debugging information. The solution to the second is to specify the directory with the command "dir":

(gdb) help dir
Add directory DIR to beginning of search path for source files.
Forget cached info on source file locations and line positions.
DIR can also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.

Unfortunately, no one ever got around to adding a way to manipulate the search path in insight directly. Alas, you are using a startup script, so you could just add search paths to that. I usually add them to my .gdbinit.

Keith


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