Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Unified Diff: src/tools/windows/dump_syms/testdata/pdb_pdata.cc

Issue 1782453003: Windows dump_syms: Add unittest for a PDB containing PDATA/XDATA Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@pdb-pdata
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/tools/windows/dump_syms/testdata/pdb_pdata.cc
diff --git a/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc b/src/tools/windows/dump_syms/testdata/pdb_pdata.cc
similarity index 80%
copy from src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc
copy to src/tools/windows/dump_syms/testdata/pdb_pdata.cc
index e5cc5cf90e0b2ccde80a805eb36c05208ae1756b..f89af87344a95823de1ab251ebef12670bdacc03 100644
--- a/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc
+++ b/src/tools/windows/dump_syms/testdata/pdb_pdata.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2007, Google Inc.
+// Copyright (c) 2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,8 +27,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// cl /Zi dump_syms_regtest.cc /link /PROFILE
-// dump_syms dump_syms_regtest.pdb > dump_syms_regtest.sym
+// vcvarsall.bat x64
+// cl /Zi pdb_pdata.cc /Fe./pdb_pdata_in_exe.exe /link /PROFILE
+// dump_syms pdb_pdata_in_exe.pdb > pdb_pdata_in_exe.sym
+// cl /Zi pdb_pdata.cc /Fe./pdb_pdata_in_pdb.exe /link /PROFILE /debugtype:pdata
+// del pdb_pdata_in_pdb.exe
+// dump_syms pdb_pdata_in_pdb.pdb > pdb_pdata_in_pdb.sym
+// diff pdb_pdata_in_pdb.sym pdb_pdata_in_exe.sym
+// should be identical apart from debug-id
namespace google_breakpad {
@@ -40,6 +46,7 @@ class C {
void set_member(int value) { member_ = value; }
int member() const { return member_; }
+ int e() { return member_ + g(); }
void f() { member_ = g(); }
virtual int g() { return 2; }
static char* h(const C &that) { return 0; }
@@ -48,10 +55,14 @@ class C {
int member_;
};
-static int i() {
+static int j() {
return 3;
}
+static int i() {
+ return j();
+}
+
} // namespace google_breakpad
int main(int argc, char **argv) {
« no previous file with comments | « src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym ('k') | src/tools/windows/dump_syms/testdata/pdb_pdata_in_exe.exe » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698