]> git.saurik.com Git - wxWidgets.git/blob - src/common/debugrpt.cpp
Fix build with wxUSE_FFILE=0.
[wxWidgets.git] / src / common / debugrpt.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/debugrpt.cpp
3 // Purpose: wxDebugReport and related classes implementation
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 2005-01-17
7 // RCS-ID: $Id$
8 // Copyright: (c) 2005 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #ifndef WX_PRECOMP
27 #include "wx/app.h"
28 #include "wx/log.h"
29 #include "wx/intl.h"
30 #include "wx/utils.h"
31 #endif // WX_PRECOMP
32
33 #if wxUSE_DEBUGREPORT && wxUSE_XML
34
35 #include "wx/debugrpt.h"
36 #if wxUSE_FFILE
37 #include "wx/ffile.h"
38 #elif wxUSE_FILE
39 #include "wx/file.h"
40 #endif
41
42 #include "wx/filename.h"
43 #include "wx/dir.h"
44 #include "wx/dynlib.h"
45
46 #include "wx/xml/xml.h"
47
48 #if wxUSE_STACKWALKER
49 #include "wx/stackwalk.h"
50 #endif
51
52 #if wxUSE_CRASHREPORT
53 #include "wx/msw/crashrpt.h"
54 #endif
55
56 #if wxUSE_ZIPSTREAM
57 #include "wx/wfstream.h"
58 #include "wx/zipstrm.h"
59 #endif // wxUSE_ZIPSTREAM
60
61 WX_CHECK_BUILD_OPTIONS("wxQA")
62
63 // ----------------------------------------------------------------------------
64 // XmlStackWalker: stack walker specialization which dumps stack in XML
65 // ----------------------------------------------------------------------------
66
67 #if wxUSE_STACKWALKER
68
69 class XmlStackWalker : public wxStackWalker
70 {
71 public:
72 XmlStackWalker(wxXmlNode *nodeStack)
73 {
74 m_isOk = false;
75 m_nodeStack = nodeStack;
76 }
77
78 bool IsOk() const { return m_isOk; }
79
80 protected:
81 virtual void OnStackFrame(const wxStackFrame& frame);
82
83 wxXmlNode *m_nodeStack;
84 bool m_isOk;
85 };
86
87 // ----------------------------------------------------------------------------
88 // local functions
89 // ----------------------------------------------------------------------------
90
91 static inline void
92 HexProperty(wxXmlNode *node, const wxChar *name, unsigned long value)
93 {
94 node->AddAttribute(name, wxString::Format(wxT("%08lx"), value));
95 }
96
97 static inline void
98 NumProperty(wxXmlNode *node, const wxChar *name, unsigned long value)
99 {
100 node->AddAttribute(name, wxString::Format(wxT("%lu"), value));
101 }
102
103 static inline void
104 TextElement(wxXmlNode *node, const wxChar *name, const wxString& value)
105 {
106 wxXmlNode *nodeChild = new wxXmlNode(wxXML_ELEMENT_NODE, name);
107 node->AddChild(nodeChild);
108 nodeChild->AddChild(new wxXmlNode(wxXML_TEXT_NODE, wxEmptyString, value));
109 }
110
111 #if wxUSE_CRASHREPORT && defined(__INTEL__)
112
113 static inline void
114 HexElement(wxXmlNode *node, const wxChar *name, unsigned long value)
115 {
116 TextElement(node, name, wxString::Format(wxT("%08lx"), value));
117 }
118
119 #endif // wxUSE_CRASHREPORT
120
121 // ============================================================================
122 // XmlStackWalker implementation
123 // ============================================================================
124
125 void XmlStackWalker::OnStackFrame(const wxStackFrame& frame)
126 {
127 m_isOk = true;
128
129 wxXmlNode *nodeFrame = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("frame"));
130 m_nodeStack->AddChild(nodeFrame);
131
132 NumProperty(nodeFrame, wxT("level"), frame.GetLevel());
133 wxString func = frame.GetName();
134 if ( !func.empty() )
135 {
136 nodeFrame->AddAttribute(wxT("function"), func);
137 HexProperty(nodeFrame, wxT("offset"), frame.GetOffset());
138 }
139
140 if ( frame.HasSourceLocation() )
141 {
142 nodeFrame->AddAttribute(wxT("file"), frame.GetFileName());
143 NumProperty(nodeFrame, wxT("line"), frame.GetLine());
144 }
145
146 const size_t nParams = frame.GetParamCount();
147 if ( nParams )
148 {
149 wxXmlNode *nodeParams = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("parameters"));
150 nodeFrame->AddChild(nodeParams);
151
152 for ( size_t n = 0; n < nParams; n++ )
153 {
154 wxXmlNode *
155 nodeParam = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("parameter"));
156 nodeParams->AddChild(nodeParam);
157
158 NumProperty(nodeParam, wxT("number"), n);
159
160 wxString type, name, value;
161 if ( !frame.GetParam(n, &type, &name, &value) )
162 continue;
163
164 if ( !type.empty() )
165 TextElement(nodeParam, wxT("type"), type);
166
167 if ( !name.empty() )
168 TextElement(nodeParam, wxT("name"), name);
169
170 if ( !value.empty() )
171 TextElement(nodeParam, wxT("value"), value);
172 }
173 }
174 }
175
176 #endif // wxUSE_STACKWALKER
177
178 // ============================================================================
179 // wxDebugReport implementation
180 // ============================================================================
181
182 // ----------------------------------------------------------------------------
183 // initialization and cleanup
184 // ----------------------------------------------------------------------------
185
186 wxDebugReport::wxDebugReport()
187 {
188 // get a temporary directory name
189 wxString appname = GetReportName();
190
191 // we can't use CreateTempFileName() because it creates a file, not a
192 // directory, so do our best to create a unique name ourselves
193 //
194 // of course, this doesn't protect us against malicious users...
195 #if wxUSE_DATETIME
196 m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu-%s"),
197 wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname,
198 wxGetProcessId(),
199 wxDateTime::Now().Format(wxT("%Y%m%dT%H%M%S")));
200 #else
201 m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu"),
202 wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname,
203 wxGetProcessId());
204 #endif
205
206 // as we are going to save the process state there use restrictive
207 // permissions
208 if ( !wxMkdir(m_dir, 0700) )
209 {
210 wxLogSysError(_("Failed to create directory \"%s\""), m_dir.c_str());
211 wxLogError(_("Debug report couldn't be created."));
212
213 Reset();
214 }
215 }
216
217 wxDebugReport::~wxDebugReport()
218 {
219 if ( !m_dir.empty() )
220 {
221 // remove all files in this directory
222 wxDir dir(m_dir);
223 wxString file;
224 for ( bool cont = dir.GetFirst(&file); cont; cont = dir.GetNext(&file) )
225 {
226 if ( wxRemove(wxFileName(m_dir, file).GetFullPath()) != 0 )
227 {
228 wxLogSysError(_("Failed to remove debug report file \"%s\""),
229 file.c_str());
230 m_dir.clear();
231 break;
232 }
233 }
234 }
235
236 if ( !m_dir.empty() )
237 {
238 // Temp fix: what should this be? eVC++ doesn't like wxRmDir
239 #ifdef __WXWINCE__
240 if ( wxRmdir(m_dir.fn_str()) != 0 )
241 #else
242 if ( wxRmDir(m_dir.fn_str()) != 0 )
243 #endif
244 {
245 wxLogSysError(_("Failed to clean up debug report directory \"%s\""),
246 m_dir.c_str());
247 }
248 }
249 }
250
251 // ----------------------------------------------------------------------------
252 // various helpers
253 // ----------------------------------------------------------------------------
254
255 wxString wxDebugReport::GetReportName() const
256 {
257 if ( wxTheApp )
258 return wxTheApp->GetAppName();
259
260 return wxT("wx");
261 }
262
263 void
264 wxDebugReport::AddFile(const wxString& filename, const wxString& description)
265 {
266 wxString name;
267 wxFileName fn(filename);
268 if ( fn.IsAbsolute() )
269 {
270 // we need to copy the file to the debug report directory: give it the
271 // same name there
272 name = fn.GetFullName();
273
274 if (!wxCopyFile(fn.GetFullPath(),
275 wxFileName(GetDirectory(), name).GetFullPath()))
276 return;
277 }
278 else // file relative to the report directory
279 {
280 name = filename;
281
282 wxASSERT_MSG( wxFileName(GetDirectory(), name).FileExists(),
283 wxT("file should exist in debug report directory") );
284 }
285
286 m_files.Add(name);
287 m_descriptions.Add(description);
288 }
289
290 bool
291 wxDebugReport::AddText(const wxString& filename,
292 const wxString& text,
293 const wxString& description)
294 {
295 #if wxUSE_FFILE || wxUSE_FILE
296 wxASSERT_MSG( !wxFileName(filename).IsAbsolute(),
297 wxT("filename should be relative to debug report directory") );
298
299 const wxString fullPath = wxFileName(GetDirectory(), filename).GetFullPath();
300 #if wxUSE_FFILE
301 wxFFile file(fullPath, wxT("w"));
302 #elif wxUSE_FILE
303 wxFile file(fullPath, wxFile::write);
304 #endif
305 if ( !file.IsOpened() || !file.Write(text, wxConvAuto()) )
306 return false;
307
308 AddFile(filename, description);
309
310 return true;
311 #else // !wxUSE_FFILE && !wxUSE_FILE
312 return false;
313 #endif
314 }
315
316 void wxDebugReport::RemoveFile(const wxString& name)
317 {
318 const int n = m_files.Index(name);
319 wxCHECK_RET( n != wxNOT_FOUND, wxT("No such file in wxDebugReport") );
320
321 m_files.RemoveAt(n);
322 m_descriptions.RemoveAt(n);
323
324 wxRemove(wxFileName(GetDirectory(), name).GetFullPath());
325 }
326
327 bool wxDebugReport::GetFile(size_t n, wxString *name, wxString *desc) const
328 {
329 if ( n >= m_files.GetCount() )
330 return false;
331
332 if ( name )
333 *name = m_files[n];
334 if ( desc )
335 *desc = m_descriptions[n];
336
337 return true;
338 }
339
340 void wxDebugReport::AddAll(Context context)
341 {
342 #if wxUSE_STACKWALKER
343 AddContext(context);
344 #endif // wxUSE_STACKWALKER
345
346 #if wxUSE_CRASHREPORT
347 AddDump(context);
348 #endif // wxUSE_CRASHREPORT
349
350 #if !wxUSE_STACKWALKER && !wxUSE_CRASHREPORT
351 wxUnusedVar(context);
352 #endif
353 }
354
355 // ----------------------------------------------------------------------------
356 // adding basic text information about current context
357 // ----------------------------------------------------------------------------
358
359 #if wxUSE_STACKWALKER
360
361 bool wxDebugReport::DoAddSystemInfo(wxXmlNode *nodeSystemInfo)
362 {
363 nodeSystemInfo->AddAttribute(wxT("description"), wxGetOsDescription());
364
365 return true;
366 }
367
368 bool wxDebugReport::DoAddLoadedModules(wxXmlNode *nodeModules)
369 {
370 wxDynamicLibraryDetailsArray modules(wxDynamicLibrary::ListLoaded());
371 const size_t count = modules.GetCount();
372 if ( !count )
373 return false;
374
375 for ( size_t n = 0; n < count; n++ )
376 {
377 const wxDynamicLibraryDetails& info = modules[n];
378
379 wxXmlNode *nodeModule = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("module"));
380 nodeModules->AddChild(nodeModule);
381
382 wxString path = info.GetPath();
383 if ( path.empty() )
384 path = info.GetName();
385 if ( !path.empty() )
386 nodeModule->AddAttribute(wxT("path"), path);
387
388 void *addr = NULL;
389 size_t len = 0;
390 if ( info.GetAddress(&addr, &len) )
391 {
392 HexProperty(nodeModule, wxT("address"), wxPtrToUInt(addr));
393 HexProperty(nodeModule, wxT("size"), len);
394 }
395
396 wxString ver = info.GetVersion();
397 if ( !ver.empty() )
398 {
399 nodeModule->AddAttribute(wxT("version"), ver);
400 }
401 }
402
403 return true;
404 }
405
406 bool wxDebugReport::DoAddExceptionInfo(wxXmlNode *nodeContext)
407 {
408 #if wxUSE_CRASHREPORT
409 wxCrashContext c;
410 if ( !c.code )
411 return false;
412
413 wxXmlNode *nodeExc = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("exception"));
414 nodeContext->AddChild(nodeExc);
415
416 HexProperty(nodeExc, wxT("code"), c.code);
417 nodeExc->AddAttribute(wxT("name"), c.GetExceptionString());
418 HexProperty(nodeExc, wxT("address"), wxPtrToUInt(c.addr));
419
420 #ifdef __INTEL__
421 wxXmlNode *nodeRegs = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("registers"));
422 nodeContext->AddChild(nodeRegs);
423 HexElement(nodeRegs, wxT("eax"), c.regs.eax);
424 HexElement(nodeRegs, wxT("ebx"), c.regs.ebx);
425 HexElement(nodeRegs, wxT("ecx"), c.regs.edx);
426 HexElement(nodeRegs, wxT("edx"), c.regs.edx);
427 HexElement(nodeRegs, wxT("esi"), c.regs.esi);
428 HexElement(nodeRegs, wxT("edi"), c.regs.edi);
429
430 HexElement(nodeRegs, wxT("ebp"), c.regs.ebp);
431 HexElement(nodeRegs, wxT("esp"), c.regs.esp);
432 HexElement(nodeRegs, wxT("eip"), c.regs.eip);
433
434 HexElement(nodeRegs, wxT("cs"), c.regs.cs);
435 HexElement(nodeRegs, wxT("ds"), c.regs.ds);
436 HexElement(nodeRegs, wxT("es"), c.regs.es);
437 HexElement(nodeRegs, wxT("fs"), c.regs.fs);
438 HexElement(nodeRegs, wxT("gs"), c.regs.gs);
439 HexElement(nodeRegs, wxT("ss"), c.regs.ss);
440
441 HexElement(nodeRegs, wxT("flags"), c.regs.flags);
442 #endif // __INTEL__
443
444 return true;
445 #else // !wxUSE_CRASHREPORT
446 wxUnusedVar(nodeContext);
447
448 return false;
449 #endif // wxUSE_CRASHREPORT/!wxUSE_CRASHREPORT
450 }
451
452 bool wxDebugReport::AddContext(wxDebugReport::Context ctx)
453 {
454 wxCHECK_MSG( IsOk(), false, wxT("use IsOk() first") );
455
456 // create XML dump of current context
457 wxXmlDocument xmldoc;
458 wxXmlNode *nodeRoot = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("report"));
459 xmldoc.SetRoot(nodeRoot);
460 nodeRoot->AddAttribute(wxT("version"), wxT("1.0"));
461 nodeRoot->AddAttribute(wxT("kind"), ctx == Context_Current ? wxT("user")
462 : wxT("exception"));
463
464 // add system information
465 wxXmlNode *nodeSystemInfo = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("system"));
466 if ( DoAddSystemInfo(nodeSystemInfo) )
467 nodeRoot->AddChild(nodeSystemInfo);
468 else
469 delete nodeSystemInfo;
470
471 // add information about the loaded modules
472 wxXmlNode *nodeModules = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("modules"));
473 if ( DoAddLoadedModules(nodeModules) )
474 nodeRoot->AddChild(nodeModules);
475 else
476 delete nodeModules;
477
478 // add CPU context information: this only makes sense for exceptions as our
479 // current context is not very interesting otherwise
480 if ( ctx == Context_Exception )
481 {
482 wxXmlNode *nodeContext = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("context"));
483 if ( DoAddExceptionInfo(nodeContext) )
484 nodeRoot->AddChild(nodeContext);
485 else
486 delete nodeContext;
487 }
488
489 // add stack traceback
490 #if wxUSE_STACKWALKER
491 wxXmlNode *nodeStack = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("stack"));
492 XmlStackWalker sw(nodeStack);
493 #if wxUSE_ON_FATAL_EXCEPTION
494 if ( ctx == Context_Exception )
495 {
496 sw.WalkFromException();
497 }
498 else // Context_Current
499 #endif // wxUSE_ON_FATAL_EXCEPTION
500 {
501 sw.Walk();
502 }
503
504 if ( sw.IsOk() )
505 nodeRoot->AddChild(nodeStack);
506 else
507 delete nodeStack;
508 #endif // wxUSE_STACKWALKER
509
510 // finally let the user add any extra information he needs
511 DoAddCustomContext(nodeRoot);
512
513
514 // save the entire context dump in a file
515 wxFileName fn(m_dir, GetReportName(), wxT("xml"));
516
517 if ( !xmldoc.Save(fn.GetFullPath()) )
518 return false;
519
520 AddFile(fn.GetFullName(), _("process context description"));
521
522 return true;
523 }
524
525 #endif // wxUSE_STACKWALKER
526
527 // ----------------------------------------------------------------------------
528 // adding core dump
529 // ----------------------------------------------------------------------------
530
531 #if wxUSE_CRASHREPORT
532
533 bool wxDebugReport::AddDump(Context ctx)
534 {
535 wxCHECK_MSG( IsOk(), false, wxT("use IsOk() first") );
536
537 wxFileName fn(m_dir, GetReportName(), wxT("dmp"));
538 wxCrashReport::SetFileName(fn.GetFullPath());
539
540 if ( !(ctx == Context_Exception ? wxCrashReport::Generate()
541 : wxCrashReport::GenerateNow()) )
542 return false;
543
544 AddFile(fn.GetFullName(), _("dump of the process state (binary)"));
545
546 return true;
547 }
548
549 #endif // wxUSE_CRASHREPORT
550
551 // ----------------------------------------------------------------------------
552 // report processing
553 // ----------------------------------------------------------------------------
554
555 bool wxDebugReport::Process()
556 {
557 if ( !GetFilesCount() )
558 {
559 wxLogError(_("Debug report generation has failed."));
560
561 return false;
562 }
563
564 if ( !DoProcess() )
565 {
566 wxLogError(_("Processing debug report has failed, leaving the files in \"%s\" directory."),
567 GetDirectory().c_str());
568
569 Reset();
570
571 return false;
572 }
573
574 return true;
575 }
576
577 bool wxDebugReport::DoProcess()
578 {
579 wxString msg(_("A debug report has been generated. It can be found in"));
580 msg << wxT("\n")
581 wxT("\t") << GetDirectory() << wxT("\n\n")
582 << _("And includes the following files:\n");
583
584 wxString name, desc;
585 const size_t count = GetFilesCount();
586 for ( size_t n = 0; n < count; n++ )
587 {
588 GetFile(n, &name, &desc);
589 msg += wxString::Format("\t%s: %s\n", name, desc);
590 }
591
592 msg += _("\nPlease send this report to the program maintainer, thank you!\n");
593
594 wxLogMessage(wxT("%s"), msg.c_str());
595
596 // we have to do this or the report would be deleted, and we don't even
597 // have any way to ask the user if he wants to keep it from here
598 Reset();
599
600 return true;
601 }
602
603 // ============================================================================
604 // wxDebugReport-derived classes
605 // ============================================================================
606
607 #if wxUSE_ZIPSTREAM
608
609 // ----------------------------------------------------------------------------
610 // wxDebugReportCompress
611 // ----------------------------------------------------------------------------
612
613 void wxDebugReportCompress::SetCompressedFileDirectory(const wxString& dir)
614 {
615 wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" );
616
617 m_zipDir = dir;
618 }
619
620 void wxDebugReportCompress::SetCompressedFileBaseName(const wxString& name)
621 {
622 wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" );
623
624 m_zipName = name;
625 }
626
627 bool wxDebugReportCompress::DoProcess()
628 {
629 #define HAS_FILE_STREAMS (wxUSE_STREAMS && (wxUSE_FILE || wxUSE_FFILE))
630 #if HAS_FILE_STREAMS
631 const size_t count = GetFilesCount();
632 if ( !count )
633 return false;
634
635 // create the compressed report file outside of the directory with the
636 // report files as it will be deleted by wxDebugReport dtor but we want to
637 // keep this one: for this we simply treat the directory name as the name
638 // of the file so that its last component becomes our base name
639 wxFileName fn(GetDirectory());
640 if ( !m_zipDir.empty() )
641 fn.SetPath(m_zipDir);
642 if ( !m_zipName.empty() )
643 fn.SetName(m_zipName);
644 fn.SetExt("zip");
645
646 // create the streams
647 const wxString ofullPath = fn.GetFullPath();
648 #if wxUSE_FFILE
649 wxFFileOutputStream os(ofullPath, wxT("wb"));
650 #elif wxUSE_FILE
651 wxFileOutputStream os(ofullPath);
652 #endif
653 if ( !os.IsOk() )
654 return false;
655 wxZipOutputStream zos(os, 9);
656
657 // add all files to the ZIP one
658 wxString name, desc;
659 for ( size_t n = 0; n < count; n++ )
660 {
661 GetFile(n, &name, &desc);
662
663 wxZipEntry *ze = new wxZipEntry(name);
664 ze->SetComment(desc);
665
666 if ( !zos.PutNextEntry(ze) )
667 return false;
668
669 const wxString ifullPath = wxFileName(GetDirectory(), name).GetFullPath();
670 #if wxUSE_FFILE
671 wxFFileInputStream is(ifullPath);
672 #elif wxUSE_FILE
673 wxFileInputStream is(ifullPath);
674 #endif
675 if ( !is.IsOk() || !zos.Write(is).IsOk() )
676 return false;
677 }
678
679 if ( !zos.Close() )
680 return false;
681
682 m_zipfile = ofullPath;
683
684 return true;
685 #else
686 return false;
687 #endif // HAS_FILE_STREAMS
688 }
689
690 // ----------------------------------------------------------------------------
691 // wxDebugReportUpload
692 // ----------------------------------------------------------------------------
693
694 wxDebugReportUpload::wxDebugReportUpload(const wxString& url,
695 const wxString& input,
696 const wxString& action,
697 const wxString& curl)
698 : m_uploadURL(url),
699 m_inputField(input),
700 m_curlCmd(curl)
701 {
702 if ( m_uploadURL.Last() != wxT('/') )
703 m_uploadURL += wxT('/');
704 m_uploadURL += action;
705 }
706
707 bool wxDebugReportUpload::DoProcess()
708 {
709 if ( !wxDebugReportCompress::DoProcess() )
710 return false;
711
712
713 wxArrayString output, errors;
714 int rc = wxExecute(wxString::Format
715 (
716 wxT("%s -F \"%s=@%s\" %s"),
717 m_curlCmd.c_str(),
718 m_inputField.c_str(),
719 GetCompressedFileName().c_str(),
720 m_uploadURL.c_str()
721 ),
722 output,
723 errors);
724 if ( rc == -1 )
725 {
726 wxLogError(_("Failed to execute curl, please install it in PATH."));
727 }
728 else if ( rc != 0 )
729 {
730 const size_t count = errors.GetCount();
731 if ( count )
732 {
733 for ( size_t n = 0; n < count; n++ )
734 {
735 wxLogWarning(wxT("%s"), errors[n].c_str());
736 }
737 }
738
739 wxLogError(_("Failed to upload the debug report (error code %d)."), rc);
740 }
741 else // rc == 0
742 {
743 if ( OnServerReply(output) )
744 return true;
745 }
746
747 return false;
748 }
749
750 #endif // wxUSE_ZIPSTREAM
751
752 #endif // wxUSE_DEBUGREPORT