public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* source code query
@ 2009-08-07 12:48 pooja nagpal
  2009-09-08 15:01 ` Keith Seitz
  2009-09-09  9:35 ` pooja nagpal
  0 siblings, 2 replies; 4+ messages in thread
From: pooja nagpal @ 2009-08-07 12:48 UTC (permalink / raw)
  To: insight

Insight sometimes cannot find the source code.
We believe this is due to a windows environment variable being set
incorrectly, but we do not fully understand the issue or why it seems
to differ between users.

Please suggest

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: source code query
  2009-08-07 12:48 source code query pooja nagpal
@ 2009-09-08 15:01 ` Keith Seitz
  2009-09-09  9:35 ` pooja nagpal
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2009-09-08 15:01 UTC (permalink / raw)
  To: pooja nagpal; +Cc: insight

On 08/07/2009 05:48 AM, pooja nagpal wrote:
> Insight sometimes cannot find the source code.
> We believe this is due to a windows environment variable being set
> incorrectly, but we do not fully understand the issue or why it seems
> to differ between users.

What makes you believe that a Windows environment variable would alter 
the way gdb or Insight work? To the best of my knowledge, environment 
variables do not affect gdb's or Insight's ability to find source files 
(or do just about anything else).

The first thing to check is if gdb can find your source file (if Insight 
cannot). Open a console window and type "list" (if you want the current 
source location). If gdb outputs an error saying that it cannot find 
your source, you probably need to set the source code search directory 
path. Type "help dir" in a console window to see how to do this.

I am, of course, assuming that all your object files were compiled with 
debug info. If they weren't, there is no way gdb or Insight could find 
them. [I know, that's a really dumb thing to say, but it happens so 
frequently, that I have to mention it.]

Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: source code query
  2009-08-07 12:48 source code query pooja nagpal
  2009-09-08 15:01 ` Keith Seitz
@ 2009-09-09  9:35 ` pooja nagpal
  2009-09-09 14:51   ` Keith Seitz
  1 sibling, 1 reply; 4+ messages in thread
From: pooja nagpal @ 2009-09-09  9:35 UTC (permalink / raw)
  To: insight


gdb is showing the source code . All the code is complied with "-g"
option. once I refreshed my PC , insight start picking up the source
code. but on other machine it is still not picking up the souce code ?

Second issue -- facing problem with breakpoints also.
Here we are compiling our source code with GCC complier and debugging
with cygwin\insight.exe. Is this can be cause of breakpoints .

Like gdb we have dir command to set the path . $cdir and $cwd are the
values of these .

Do we have some command for the insight also to set the source path.

pooja nagpal wrote:
> 
> Insight sometimes cannot find the source code.
> We believe this is due to a windows environment variable being set
> incorrectly, but we do not fully understand the issue or why it seems
> to differ between users.
> 
> Please suggest
> 
> 

-- 
View this message in context: http://www.nabble.com/source-code-query-tp24864253p25361583.html
Sent from the Sourceware - insight list mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: source code query
  2009-09-09  9:35 ` pooja nagpal
@ 2009-09-09 14:51   ` Keith Seitz
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2009-09-09 14:51 UTC (permalink / raw)
  To: pooja nagpal; +Cc: insight

On 09/09/2009 02:35 AM, pooja nagpal wrote:
>
> gdb is showing the source code . All the code is complied with "-g"
> option. once I refreshed my PC , insight start picking up the source
> code. but on other machine it is still not picking up the souce code ?

It is unusual for gdb to be able to find the source code and not 
insight. In fact, I'm not sure I've ever seen this before. Try opening a 
debug window and seeing if that says anything when your source file is 
searched. There are two ways to do this:

1) Set GDBTK_DEBUG (optionally also set GDBTK_DEBUGFILENAME). See README.
2) *BEFORE* you encounter the problem (attempt to load the source for 
the file that you think should be found for the first time), open a 
console window and enter "tk ManagedWin::open DebugWin".

And I have to ask, when you say "once I refreshed my PC, insight start 
picking up the source code." What exactly does this mean?

> Second issue -- facing problem with breakpoints also.
> Here we are compiling our source code with GCC complier and debugging
> with cygwin\insight.exe. Is this can be cause of breakpoints .

You haven't told me what your problem with breakpoints is. Can you 
elaborate a little?

> Like gdb we have dir command to set the path . $cdir and $cwd are the
> values of these .

These are simply default values. This may not be sufficient, depending 
on your build environment.

> Do we have some command for the insight also to set the source path.

Unfortunately, no. That was never done. This was part of a big revamp of 
source window loading that I intended to play with, but never got around 
to doing. IMO, this is the biggest "hole" in insight today... Who knows, 
it might just be something that I try to "plug" before the next release.

Insight uses gdb's source search path. To add something to it, simply 
use the console or add something to your .gdbinit file.

Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-09 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-07 12:48 source code query pooja nagpal
2009-09-08 15:01 ` Keith Seitz
2009-09-09  9:35 ` pooja nagpal
2009-09-09 14:51   ` Keith Seitz

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).