On Thu, Oct 22, 2009 at 1:05 AM, Fred Kiefer <[email protected]> wrote:
> Richard Frith-Macdonald schrieb:
>> On 21 Oct 2009, at 19:39, Fred Kiefer wrote:
>>>> make messages=yes
>>
>> That prints verbose output while bulding ... it doesn't build for
>> debugging.
>> What you want is
>> '
>> make debug=yes
>>
>>>> produces this info, but this didn't worked for gnustep-examples programs
>>>> only for a simple HelloWorld program (using Foundation NSLog, etc)
>>>>
>>>
>>> As far as I know all GNUstep components get compiled with debug
>>> information enabled.
>>
>> Yes, but unless you do 'make debug=yes' they are also compiled with
>> optimisation ... which makes it difficult to interpret the output of gdb
>> reliably as the optimiser will change the exact control flow in the
>> program (so the line displayed in gdb can jump about unpredictably) and
>> will remove many variables (so gdb can't examine them).
>
> Thank you for that tip. I was always annoyed by seeing the same line
> twice in gdb because of the instruction reordering. But then I never
> took the time to think about getting rid of that problem, so perhaps I
> was not annoyed enough.

gcc 4.5.0 (current active development branch) should have better
support for debugging optimized programs

http://gcc.gnu.org/wiki/Var_Tracking_Assignments

and the var-tracking-assignments-*-branch have been merged into mainline.


_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to