* smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
handling. * fhandler_process.cc (format_process_maps): Print major, minor and inode numbers correctly.
This commit is contained in:
parent
faf07ace92
commit
e86f8b7925
|
@ -1,3 +1,10 @@
|
||||||
|
2005-01-29 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
|
||||||
|
handling.
|
||||||
|
* fhandler_process.cc (format_process_maps): Print major, minor and
|
||||||
|
inode numbers correctly.
|
||||||
|
|
||||||
2005-01-29 Corinna Vinschen <corinna@vinschen.de>
|
2005-01-29 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* autoload.cc (GetModuleFileNameExA): Add.
|
* autoload.cc (GetModuleFileNameExA): Add.
|
||||||
|
|
|
@ -468,7 +468,13 @@ format_process_maps (_pinfo *p, char *destbuf, size_t maxsize)
|
||||||
{
|
{
|
||||||
char access[5];
|
char access[5];
|
||||||
strcpy (access, "r--p");
|
strcpy (access, "r--p");
|
||||||
|
struct __stat64 st;
|
||||||
cygwin_conv_to_full_posix_path (modname, posix_modname);
|
cygwin_conv_to_full_posix_path (modname, posix_modname);
|
||||||
|
if (stat64 (posix_modname, &st))
|
||||||
|
{
|
||||||
|
st.st_dev = 0;
|
||||||
|
st.st_ino = 0;
|
||||||
|
}
|
||||||
if (len + strlen (posix_modname) + 50 > maxsize - 1)
|
if (len + strlen (posix_modname) + 50 > maxsize - 1)
|
||||||
break;
|
break;
|
||||||
if (workingset)
|
if (workingset)
|
||||||
|
@ -485,14 +491,16 @@ format_process_maps (_pinfo *p, char *destbuf, size_t maxsize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int written = __small_sprintf (destbuf + len,
|
int written = __small_sprintf (destbuf + len,
|
||||||
"%08lx-%08lx %s %08lx 00:00 %lu ",
|
"%08lx-%08lx %s %08lx %04x:%04x %U ",
|
||||||
info.lpBaseOfDll,
|
info.lpBaseOfDll,
|
||||||
(unsigned long)info.lpBaseOfDll
|
(unsigned long)info.lpBaseOfDll
|
||||||
+ info.SizeOfImage,
|
+ info.SizeOfImage,
|
||||||
access,
|
access,
|
||||||
info.EntryPoint,
|
info.EntryPoint,
|
||||||
info.SizeOfImage);
|
st.st_dev >> 16,
|
||||||
while (written++ < 49)
|
st.st_dev & 0xffff,
|
||||||
|
st.st_ino);
|
||||||
|
while (written++ < 61)
|
||||||
destbuf[len + written] = ' ';
|
destbuf[len + written] = ' ';
|
||||||
len += written;
|
len += written;
|
||||||
len += __small_sprintf (destbuf + len, "%s\n", posix_modname);
|
len += __small_sprintf (destbuf + len, "%s\n", posix_modname);
|
||||||
|
|
|
@ -22,7 +22,7 @@ static char *
|
||||||
rn (char *dst, int base, int dosign, long long val, int len, int pad)
|
rn (char *dst, int base, int dosign, long long val, int len, int pad)
|
||||||
{
|
{
|
||||||
/* longest number is ULLONG_MAX, 18446744073709551615, 20 digits */
|
/* longest number is ULLONG_MAX, 18446744073709551615, 20 digits */
|
||||||
unsigned uval;
|
unsigned long long uval;
|
||||||
char res[20];
|
char res[20];
|
||||||
static const char str[16] = "0123456789ABCDEF";
|
static const char str[16] = "0123456789ABCDEF";
|
||||||
int l = 0;
|
int l = 0;
|
||||||
|
|
Loading…
Reference in New Issue