DDD looking for source file with IP address?

"R. Bernstein" <[email protected]>
Newsgroups gmane.comp.debugging.ddd.general
Message-ID <[email protected]>
mark_2811 writes:
 > 
 > Hi,
 > 
 > I've got a strange problem with DDD (v ).  When a breakpoint gets hit, DDD pops up a dialog saying "DDD: No Source".  It seems to be searching for a source file named "192.168.0.1" in the directory where my executable is located.  I searched on google and couldn't find any other references to this issue, has anyone here seen it before?  Why would it think my computer's IP address is the name of a source file??

There are a number of important details missing which makes it only
possible to answer to answer this in a general. The short answer is
that in parsing the position gdb sees that IP address where it is
expecting a file name.

Here's a suggestion to track down the problem. Let's suppose you are
debugging the C program sample.c given the distribution. I set a
breakpoint and ran the program. Now when I stop at the breakpoint,
since gdb is the underlying debugger, I know that to get history in
gdb I run "show commands". I do that and see after the "run"
statement:

  165  run
  166  info breakpoints

Okay. So now I run "info breakpoints" (which I didn't invoke but ddd
did) and I see:

(gdb) info breakpoints
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x08048544 in main at sample.c:31
    breakpoint already hit 1 time
(gdb) 

So the guess is somewhere under "Address" or "What" you'll see that IP
address. 

Let's take a different example, one closer to home, debugging a Bash
program with my debugger. Here on my GNU/Linux computer I run: 

ddd --bash /etc/init.d/network status 

and I set a breakpoint. Again to get the history enter "show
commands" works. (So does "H" as you might use for perl).

Running "show command", I now get this: 

29: L 
28: break /etc/init.d/network:16
27: cont 

"L" is the same thing as "info breakpoints" but ddd has been set to
issue "L" rather than "info breakpoints". So now when I run "L" I see

Num Type       Disp Enb What
1   breakpoint keep y   /etc/init.d/network:20
        breakpoint already hit 1 time

Here there is no "Address" field, but still a "What" field and in fact
that's what ddd parses on.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.