Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 21, 2006 Making sense of Access Violation | ||||
---|---|---|---|---|
| ||||
I'm making a multithreaded gui app which gives me an Access Violation exception. I'm not sure how to figure out where it originates from. If I use the msvc 6 debugger, I get a crash address. But msvc doesn't show me where in the code that address is, so I'm still stuck. Is there a tool like gnu's addr2line that will give me a file and line number? I couldn't make addr2line work with the exe that dmd creates. |
April 22, 2006 Re: Making sense of Access Violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tydr Schnubbis | Tydr Schnubbis wrote:
> I'm making a multithreaded gui app which gives me an Access Violation exception. I'm not sure how to figure out where it originates from. If I use the msvc 6 debugger, I get a crash address. But msvc doesn't show me where in the code that address is, so I'm still stuck.
>
> Is there a tool like gnu's addr2line that will give me a file and line number? I couldn't make addr2line work with the exe that dmd creates.
Ok, I'm now trying to use WinDbg. I read somewhere to set a breakpoint on _main, but how? First I use the "Open Executable..." command, and that works. I've also set it to download symbols automatically. So far, so good. Then, if type "bp _main" it says "Bp expression '_main' could not be resolved, adding deferred bp", for "bm _main" it says "No matching code symbols found, no breakpoints set."
What am I doing wrong?
|
April 22, 2006 Re: Making sense of Access Violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tydr Schnubbis | Tydr Schnubbis wrote:
> Tydr Schnubbis wrote:
>> I'm making a multithreaded gui app which gives me an Access Violation exception. I'm not sure how to figure out where it originates from. If I use the msvc 6 debugger, I get a crash address. But msvc doesn't show me where in the code that address is, so I'm still stuck.
>>
>> Is there a tool like gnu's addr2line that will give me a file and line number? I couldn't make addr2line work with the exe that dmd creates.
>
> Ok, I'm now trying to use WinDbg. I read somewhere to set a breakpoint on _main, but how? First I use the "Open Executable..." command, and that works. I've also set it to download symbols automatically. So far, so good. Then, if type "bp _main" it says "Bp expression '_main' could not be resolved, adding deferred bp", for "bm _main" it says "No matching code symbols found, no breakpoints set."
>
> What am I doing wrong?
Just "bp main" works! I've managed to to get windbg to open the source code file a couple of times when fooling around with it, but I can't remember how I did it. Does anyone know?
|
April 22, 2006 Re: Making sense of Access Violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tydr Schnubbis | Tydr Schnubbis wrote:
> Tydr Schnubbis wrote:
>> Tydr Schnubbis wrote:
>>> I'm making a multithreaded gui app which gives me an Access Violation exception. I'm not sure how to figure out where it originates from. If I use the msvc 6 debugger, I get a crash address. But msvc doesn't show me where in the code that address is, so I'm still stuck.
>>>
>>> Is there a tool like gnu's addr2line that will give me a file and line number? I couldn't make addr2line work with the exe that dmd creates.
>>
>> Ok, I'm now trying to use WinDbg. I read somewhere to set a breakpoint on _main, but how? First I use the "Open Executable..." command, and that works. I've also set it to download symbols automatically. So far, so good. Then, if type "bp _main" it says "Bp expression '_main' could not be resolved, adding deferred bp", for "bm _main" it says "No matching code symbols found, no breakpoints set."
>>
>> What am I doing wrong?
> Just "bp main" works! I've managed to to get windbg to open the source code file a couple of times when fooling around with it, but I can't remember how I did it. Does anyone know?
Nevermind, I can just open them manually. Seems that to set breakpoints, I have to use the mangled symbols, but at least it works. :)
|
Copyright © 1999-2021 by the D Language Foundation