| RE: [cdt-dev] Debug source lookup question |
|
> Using source path
information in the executable to determine the breakpoint scope sounds like a
neat idea, but I don't think it would scale.
Yes, the scalability is the only reason why it hasn't
been implemented. But I still believe that provided with a better
support from GDB it could be done.
At the same time if GDB could solve the source lookup
problems internally we would only need to perform the external source lookup if
the debug information was not sufficient.
Mikhail
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Pawel Piech Sent: Thursday, November 20, 2008 5:24 PM To: CDT General developers list. Subject: Re: [cdt-dev] Debug source lookup question I find this conversation very interesting as sourfilce lookup and breakpoint filtering (or scope) are some of the most persistent usability problems for our customers. I hope that eventually we can pull together our resources and come up with something that really works. In the Wind River product, the idea behind source lookup logic is essentially identical to that of CDT. We have a path substitution source container and if the user maps his sources using this container, we will send a full path to the debugger. If user configures a search source container (e.g. Project, Folder, etc.), we will send just the filename to the debugger. Unfortunately, the difference between these two is usually too subtle for users and they get into trouble. We have a few UI additions to help the user identify when the source lookup is causing breakpoints to be planted on the wrong file, but this also is not enough. So I'm very curious if there's any new ideas out there on how to deal with this problem. On breakpoint filtering (or scope as we call it), I've never even considered using project or other information to automatically scope breakpoints to a given debug session. Instead our breakpoints have an explicit parameter that specifies which launch configurations a given BP applies to. This requires an explicit user action to specify the scope, but in practice the it is set when the breakpoint is created based on the currently active debug session. It's a simple solution, but obviously not fool-proof. Using source path information in the executable to determine the breakpoint scope sounds like a neat idea, but I don't think it would scale. Just like parsing through the project structure to generate -environment-directory commands takes a long time, processing all the paths in a 200MB executable image would be very painful. -Pawel Mikhail Khodjaiants wrote: Sorry James, my example is not correct. The correct paths are "/project/foo/../main.c" and "/project/main.c". The point is that both represent the same file, but from the GDB's point of view there are different. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |