Record vdso and vsyscall as shared libraries in OS::LogSharedLibraryAddresses on Linux

Review URL: https://codereview.chromium.org/11879036
Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent fd599723
......@@ -535,19 +535,20 @@ void OS::LogSharedLibraryAddresses() {
// the beginning of the filename or the end of the line.
do {
c = getc(fp);
} while ((c != EOF) && (c != '\n') && (c != '/'));
} while ((c != EOF) && (c != '\n') && (c != '/') && (c != '['));
if (c == EOF) break; // EOF: Was unexpected, just exit.
// Process the filename if found.
if (c == '/') {
ungetc(c, fp); // Push the '/' back into the stream to be read below.
if ((c == '/') || (c == '[')) {
// Push the '/' or '[' back into the stream to be read below.
ungetc(c, fp);
// Read to the end of the line. Exit if the read fails.
if (fgets(lib_name, kLibNameLen, fp) == NULL) break;
// Drop the newline character read by fgets. We do not need to check
// for a zero-length string because we know that we at least read the
// '/' character.
// '/' or '[' character.
lib_name[strlen(lib_name) - 1] = '\0';
} else {
// No library name found, just record the raw address range.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment