summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-25 00:36:44 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-25 00:36:44 +0000
commit9e1343fb30df204811e80bfd1387574b9d383a09 (patch)
tree49283ebc8d3129b6889965aafa8e4672082f49b2 /src/lib/util.cc
parenta9dd3d27bc52f853309885b1be02d6efd2d2af48 (diff)
Remove a couple of uses of ofstream.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 484c4fb9b..3afd3547f 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -89,7 +89,6 @@ using std::multimap;
using std::istream;
using std::numeric_limits;
using std::pair;
-using std::ofstream;
using std::cout;
using boost::shared_ptr;
using boost::thread;
@@ -260,8 +259,11 @@ seconds (struct timeval t)
LONG WINAPI exception_handler(struct _EXCEPTION_POINTERS *)
{
dbg::stack s;
- ofstream f (backtrace_file.string().c_str());
- std::copy(s.begin(), s.end(), std::ostream_iterator<dbg::stack_frame>(f, "\n"));
+ FILE* f = fopen_boost (backtrace_file, "w");
+ for (dbg::stack_frame::const_iterator i = s.begin(); i != s.end(); ++i) {
+ fprintf (f, "%p %s %d %s", i->instruction, i->function.c_str(), i->line, i->module.c_str());
+ }
+ fclose (f);
return EXCEPTION_CONTINUE_SEARCH;
}
#endif