[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DDD Breakpoints/Local variables



On Wed, Apr 14, 1999 at 12:44:56 -0600, Jake Griesbach wrote:
> I'm having trouble using DDD.  I want to simply add a breakpoint and view
> a local variable afterwards.  I have compiled my C program with
> egcs-2.91.66 with -g and -ggdb3 set.  I then load ddd, and set the
> breakpoint by selecting a source line and selecting set breakpoint.  When
> I hit run, I get the following output:
> 
> (gdb) run
> Starting program: /home/griesbac/temp/src/bjsim/bjsim 
> Breakpoint 1 at 0x823c07c: file bjsim.c, line 523.
> Cannot insert breakpoint 1:
> Cannot access memory at address 0x823c07c.
> (gdb)

This is quite likely a gdb rather than a DDD problem (I vaguely recall
similar bugs being reported - check the BTS).

> Also, after that, when I try to view a local variable, (decks), by double
> clicking on the variable in the source code, I get:
> 
> (gdb) graph display decks
> No symbol "decks" in current context.

Hmm. Local variables can be optimised out of existence in some cases.
However, this doesn't seem to be the problem here:

> <- "No selected frame.\n"
> <- "(gdb) "
> -> "display decks\n"
> <- "No symbol \"decks\" in current context.\n"

Hmm.. gdb has no stack frame selected, which forms the context within which
names are resolved. You'll need to actually run the program for gdb or DDD
to be able to display the symbol.

Ray
-- 
Cyberspace, a final frontier. These are the voyages of my messages, 
on a lightspeed mission to explore strange new systems and to boldly go
where no data has gone before. 


Reply to: