Commit 84999265 authored by Mike Stanton's avatar Mike Stanton Committed by Commit Bot

[builtins] Don't emit line number info on Windows

Currently, line number information is added to windows binaries as
DWARF data. This prevents windows tools like DUMPBIN from working,
as they don't expect to see DWARF segments. Any line number information
should be in the CodeView (PDB) format. This work is deferred until
later.

Bug: v8:9944, v8:9910
Change-Id: I87c950d9aaa543c1eb3356310289e99266f1565e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900446Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64795}
parent 8534e52d
......@@ -634,7 +634,8 @@ void PlatformEmbeddedFileWriterWin::DeclareLabel(const char* name) {
void PlatformEmbeddedFileWriterWin::SourceInfo(int fileid, const char* filename,
int line) {
fprintf(fp_, ".loc %d %d\n", fileid, line);
// BUG(9944): Use .cv_loc to ensure CodeView information is used on
// Windows.
}
void PlatformEmbeddedFileWriterWin::DeclareFunctionBegin(const char* name) {
......@@ -666,11 +667,8 @@ void PlatformEmbeddedFileWriterWin::FilePrologue() {}
void PlatformEmbeddedFileWriterWin::DeclareExternalFilename(
int fileid, const char* filename) {
// Replace any Windows style paths (backslashes) with forward
// slashes.
std::string fixed_filename(filename);
std::replace(fixed_filename.begin(), fixed_filename.end(), '\\', '/');
fprintf(fp_, ".file %d \"%s\"\n", fileid, fixed_filename.c_str());
// BUG(9944): Use .cv_filename to ensure CodeView information is used on
// Windows.
}
void PlatformEmbeddedFileWriterWin::FileEpilogue() {}
......
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