* dcrt0.cc (dll_crt0_1): Call strace.dll_info after call to pinfo_init.

* strace.cc (strace::hello): Drop printing DLL information here since
	application info is not always available at this point.
	(strace::dll_info): New method to print DLL info.
	* include/sys/strace.h (strace::dll_info): Declare.
This commit is contained in:
Corinna Vinschen 2011-06-17 08:30:27 +00:00
parent 2ae8e0e482
commit a716252619
4 changed files with 22 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2011-06-17 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (dll_crt0_1): Call strace.dll_info after call to pinfo_init.
* strace.cc (strace::hello): Drop printing DLL information here since
application info is not always available at this point.
(strace::dll_info): New method to print DLL info.
* include/sys/strace.h (strace::dll_info): Declare.
2011-06-17 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (handle_to_fn): Accommodate name change of pty named pipes,

View File

@ -806,6 +806,7 @@ dll_crt0_1 (void *)
}
#endif
pinfo_init (envp, envc);
strace.dll_info ();
/* Allocate cygheap->fdtab */
dtable_init ();

View File

@ -46,6 +46,7 @@ public:
int lmicrosec;
bool execing;
void hello () __attribute__ ((regparm (1)));
void dll_info () __attribute__ ((regparm (1)));
void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((regparm(3)))*/;
void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((regparm(3)))*/;
void wm (int message, int word, int lon) __attribute__ ((regparm(3)));

View File

@ -57,6 +57,18 @@ strace::hello ()
}
prntf (1, NULL, "**********************************************");
prntf (1, NULL, "Program name: %W %s", myself->progname, pidbuf);
prntf (1, NULL, "OS version: Windows %s", wincap.osname ());
if (cygheap)
prntf (1, NULL, "Heap size: %u", cygheap->user_heap.chunk);
prntf (1, NULL, "**********************************************");
}
}
void
strace::dll_info ()
{
if (active ())
{
prntf (1, NULL, "App version: %d.%d, api: %d.%d",
user_data->dll_major, user_data->dll_minor,
user_data->api_major, user_data->api_minor);
@ -64,10 +76,6 @@ strace::hello ()
cygwin_version.dll_major, cygwin_version.dll_minor,
cygwin_version.api_major, cygwin_version.api_minor);
prntf (1, NULL, "DLL build: %s", cygwin_version.dll_build_date);
prntf (1, NULL, "OS version: Windows %s", wincap.osname ());
if (cygheap)
prntf (1, NULL, "Heap size: %u", cygheap->user_heap.chunk);
prntf (1, NULL, "**********************************************");
}
}