Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT 8.4 Bugs Fixed in this Release

What should happen is that the dynamic printf should print as if you had a real printf.

Try to put a real printf before and after your dprintf and check everything gets printed in the proper order, buffered or not. 


BR,

Marc


----- Original Message -----
From: Marc Dumais <marc.dumais@xxxxxxxxxxxx>
To: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx>
Sent: 04/06/2014 6:36
Subject: Re: [cdt-dev] CDT 8.4 Bugs Fixed in this Release


Hi,

Yes, I think it's you see the effects of buffering. On Linux I see the dynamic printfs as they are triggered.

Regards,

Marc

 

 

 

line

MARC DUMAIS
Software developer


Ericsson
8500 Decarie
Ville Mount-Royal, Qc, Canada
Phone 514 345-7900 x45006
marc.dumais@xxxxxxxxxxxx
www.ericsson.com



http://www.ericsson.com/current_campaign

 

On 06/03/2014 10:30 PM, kesselhaus wrote:
Regarding the Dynamic Printf in debugging,
is that normal, that I only see the dynamic printf outputs after the program has finished?
Or should that be printed when I step over such a breakpoint?
Could it be, that it is the well known problem, that stdout is buffered, and you only see something after an fflush(stdout);

Looks like, if I do right after starting debug session in the gdb-console a

set gdb-style gdb

I get the output also at stepping, but then only in the GDB console.

Otherwise, for CLANG and GCC, I wonder, if there is a way to e.g. include in Debug Mode a debugging.c file with something like this:

/*
 * debugging.c
 * For debugging purpose, have this constructor function called before main()
 * to set stdout and stderr automatically to unbuffered mode
 * This file could be passed by CDT builder in the Debug configuration to the compiler
 * automatically (maybe depending on a configuration switch in project settings).
 */
#include <stdio.h>

 __attribute__((constructor)) void init_stdout_nobuf(void)
{
    setvbuf (stdout, NULL, _IONBF, BUFSIZ);
    setvbuf (stderr, NULL, _IONBF, BUFSIZ);
}




Am 28.05.2014 07:51, schrieb Francis ANDRE:
Hi

I have noticed that the list of bugs fixed in CDT 8.4 version is empty -- 
https://wiki.eclipse.org/CDT/User/NewIn84#Bugs_Fixed_in_this_Release --

Is there a way to know which bugs will be fixed in 8.4?
Is there a way to include a change in this 8.4 release? (I have this one pending: https://git.eclipse.org/r/#/c/27229/)

Rgds

Francis

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top