Re: Inline functions get debugger confused about source files
Re: Inline functions get debugger confused about source files
- Subject: Re: Inline functions get debugger confused about source files
- From: "Dave Camp" <email@hidden>
- Date: Wed, 18 Jul 2007 09:04:52 -0700 (PDT)
- Importance: Normal
On Wed, July 18, 2007 5:30 am, Alastair Houghton wrote:
> On 18 Jul 2007, at 01:17, Rua Haszard Morris wrote:
>
>> I see that issue all the time, especially with C++/classes code,
>> where you will step into a header file for certain breakpoints, and
>> my workaround is to find a way to debug using a breakpoint in a
>> different place :(
>
> For what it's worth, not every such instance is an occurrence of the
> bug that has been mentioned. At least, I don't think it is. A lot
> of the time the problem is merely that the inline function happens to
> be in a header file and so that's where you go when you step into
> it. I think the bug that was being reported was that the debugger
> didn't return to the original function when the inline function's
> execution was complete.
For me, the issue is that I'm in a function in a .cpp file and I go to
step into a called function that also resides in a .cpp file and I
consistently find myself staring at the bottom of some .h file. The
variables display is correct and I can step, I just can't see the source.
This might be triggered by some inline code being run to convert arguments
during the call, but I don't think that is the case all the time (I don't
remember, but I'll keep an eye out for that in the future).
> If turning off inlining doesn't solve the problem for you, you might
> consider moving code out of your header files into a separate source
> file, at least for the debug version of your code.
Turning off inlining does not appear to help. I did discover that my
project was still set to STABS debugging so I've switched to DWARF to see
if that helps. The problem does not happen consistently for me so it'll
take a day to see what the results are.
Oh, how I would love to move the code out of the headers! For some reason,
every time I get a Windows port job, I discover that for some horrific
reason the client decided it would be fun to to write at least 50% of the
source in .h files, all tagged with inline. Hundreds and Hundreds of
functions. Some functions go on for pages and pages.
Universally, when I ask why the client has done that, the response is "it
was convenient".
I should stop before I break my keyboard in half in rage... :-)
If I discover a way around this I'll be sure to post it.
Thanks,
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden