diff --git a/xpcom/tests/TestStackCrawl.cpp b/xpcom/tests/TestStackCrawl.cpp new file mode 100644 index 00000000000..ba234b3261c --- /dev/null +++ b/xpcom/tests/TestStackCrawl.cpp @@ -0,0 +1,14 @@ +#include + +#include "nsISupportsUtils.h" +#include "nsTraceRefCnt.h" + +int main(int argc, char* argv[]) +{ + char buf[16384]; + nsTraceRefcnt::WalkTheStack(buf, sizeof(buf)); + printf("%s\n", buf); + + return 0; +} + diff --git a/xpcom/tests/makefile.win b/xpcom/tests/makefile.win index ca79c6061ff..ffba90f3335 100644 --- a/xpcom/tests/makefile.win +++ b/xpcom/tests/makefile.win @@ -40,6 +40,7 @@ PROG14 = .\$(OBJDIR)\TestObserverService.exe PROG15 = .\$(OBJDIR)\TestBuffers.exe PROG16 = .\$(OBJDIR)\TestPipes.exe PROG17 = .\$(OBJDIR)\TestShutdown.exe +PROG18 = .\$(OBJDIR)\TestStackCrawl.exe RESFILE = timer.res @@ -57,6 +58,7 @@ PROGRAMS = $(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5) \ $(PROG15) \ $(PROG16) \ $(PROG17) \ + $(PROG18) \ $(NULL) LCFLAGS=-DUSE_NSREG -GX -DNECKO @@ -128,3 +130,5 @@ $(PROG15): $(OBJDIR) TestBuffers.cpp $(PROG16): $(OBJDIR) TestPipes.cpp $(PROG17): $(OBJDIR) TestShutdown.cpp + +$(PROG18): $(OBJDIR) TestStackCrawl.cpp