emacs-devel
[Top][All Lists]
Advanced

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

Re: gdb-ui problem


From: Nick Roberts
Subject: Re: gdb-ui problem
Date: Thu, 2 Dec 2004 17:09:45 +1300

[Please use reply-to-all so the thread keeps going to the mailing list]

 > > >  I think this needs to be fixed, gdb-ui's behavior should be like ddd, 
 > > > who
 > > > will ask gdb for file paths it cannot find under current directory.
 > > 
 > > What version are you using? I can't see this feature in GNU DDD 3.3.1.
 > 
 > I'm using the same version as yours.  Pay attention to it's status
 > line, you can see when you select "Open Source" from menu and click on
 > a file, the status line will display the file's absolute path, and
 > when you click "open", DDD will open it.  Some time DDD said the file
 > is "not found", and then it will read the file "from GDB".  After all,
 > DDD promises to find out any source file you can see from "info
 > sources" command in GDB.

OK, I misunderstood. I thought you were talking about finding files
during execution.

 > It's better to say I'm studying it ^_^ I found there's no easy way to
 > get a source file's absolute path.  Now I can only use "list this.cpp"
 > and then "info source" to check the absolute path of "this.cpp", but
 > there is no annotation infomation.  I'm wondering how DDD make it.

DDD uses "gdb -fullname", sometimes called level 1 annotatons. You can
see some of the commands that it runs behind the users back by typing
"show commands 5", "show commands +"... in the console window. I guess
it just parses the output of "info source".

You could something similar to that in gdb-ann3, for finding the source
containing the main routine (gdb-main-file) e.g

(gdb-enqueue-input (list "server list this.cpp\n" 'ignore))
(gdb-enqueue-input (list "server info source\n" 'gdb-find-file))

gdb-find-file acts as a handler for "info source" and can access its output in
the partial-output buffer. However, I'm not sure how gdb-find-file should work
so that it doesn't interfere with find-file.

Also, note that I haven't tested this mode with C++ (I have had a report
that it doesn't always parse the breakpoints table correctly for the
breakpoints buffer).

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]