Skip to content

Commit f766298

Browse files
committed
common: Write a message when downloading symbols.
Downloading symbols can take quite a while, specially on first runs, so output something to make it clear logging is not over. Issue #26.
1 parent 5172ef8 commit f766298

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

src/common/debugger.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ refreshSymbolsAndDumpStack(HANDLE hProcess, HANDLE hThread)
215215
assert(hProcess);
216216
assert(hThread);
217217

218-
// XXX: Deferred symbols don't get loaded without this
219-
SymRefreshModuleList(hProcess);
218+
loadSymbols(hProcess);
220219

221220
dumpStack(hProcess, hThread, NULL);
222221
}
@@ -383,12 +382,11 @@ BOOL DebugMainLoop(const DebugOptions *pOptions)
383382
}
384383
}
385384

386-
// XXX: Deferred symbols don't get loaded without this
387-
SymRefreshModuleList(pProcessInfo->hProcess);
388-
389385
dumpException(pProcessInfo->hProcess,
390386
&DebugEvent.u.Exception.ExceptionRecord);
391387

388+
loadSymbols(hProcess);
389+
392390
// Find the thread in the thread list
393391
THREAD_INFO_LIST::const_iterator it;
394392
for (it = pProcessInfo->Threads.begin(); it != pProcessInfo->Threads.end(); ++it) {

src/common/log.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,18 @@ dumpContext(
155155
}
156156

157157

158+
void
159+
loadSymbols(HANDLE hProcess)
160+
{
161+
lprintf("Loading symbols...");
162+
163+
// XXX: Deferred symbols don't get loaded without this
164+
SymRefreshModuleList(hProcess);
165+
166+
lprintf(" done.\n\n");
167+
}
168+
169+
158170
void
159171
dumpStack(HANDLE hProcess, HANDLE hThread,
160172
const CONTEXT *pTargetContext)

src/common/log.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ lprintf(const char * format, ...);
3535
EXTERN_C void
3636
dumpException(HANDLE hProcess, PEXCEPTION_RECORD pExceptionRecord);
3737

38+
EXTERN_C void
39+
loadSymbols(HANDLE hProcess);
40+
3841
EXTERN_C void
3942
dumpStack(HANDLE hProcess, HANDLE hThread,
4043
const CONTEXT *pContext);

src/exchndl/exchndl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ void GenerateExceptionReport(PEXCEPTION_POINTERS pExceptionInfo)
8484

8585
SetSymOptions(FALSE);
8686

87-
if (InitializeSym(hProcess, TRUE)) {
87+
if (InitializeSym(hProcess, FALSE)) {
8888

8989
dumpException(hProcess, pExceptionRecord);
9090

91+
loadSymbols(hProcess);
92+
9193
PCONTEXT pContext = pExceptionInfo->ContextRecord;
9294

9395
// XXX: In 64-bits WINE we can get context record that don't match the

0 commit comments

Comments
 (0)