www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - debugging a non-starting application?

reply "Carlos Santander B." <carlos8294 msn.com> writes:
I need some help here. How am I supposed to debug an application which doesn't 
even start? According to WinDbg it raises an unknown exception in KiFastCall, 
when executing the instruction "sysenter". It doesn't even reach main or the 
module ctors! Has anyone had that problem before? TIA.

-----------------------
Carlos Santander Bernal 
Oct 07 2004
next sibling parent reply J C Calvarese <jcc7 cox.net> writes:
Carlos Santander B. wrote:
 I need some help here. How am I supposed to debug an application which doesn't 
 even start? According to WinDbg it raises an unknown exception in KiFastCall, 
 when executing the instruction "sysenter". It doesn't even reach main or the 
 module ctors! Has anyone had that problem before? TIA.
 
 -----------------------
 Carlos Santander Bernal 
Sounds like a weird problem. I would suspect you could approach it the same as you would when trying to isolate a small test case for reporting a compile-time bug. Whether it's the compiler's fault or a mistake that you might have made, once you get it down to 20 lines or so, you could post it here or in the bugs newsgroup and ask for help. As long as you're cutting out code while retaining the non-starting error, you'd be making progress. How long is the source code right now? -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Oct 07 2004
parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
"J C Calvarese" <jcc7 cox.net> escribió en el mensaje 
news:ck4fnb$2stj$1 digitaldaemon.com...
| Carlos Santander B. wrote:
| > I need some help here. How am I supposed to debug an application which 
doesn't
| > even start? According to WinDbg it raises an unknown exception in 
KiFastCall,
| > when executing the instruction "sysenter". It doesn't even reach main or the
| > module ctors! Has anyone had that problem before? TIA.
| >
| > -----------------------
| > Carlos Santander Bernal
|
| Sounds like a weird problem.
|
| I would suspect you could approach it the same as you would when trying
| to isolate a small test case for reporting a compile-time bug. Whether
| it's the compiler's fault or a mistake that you might have made, once
| you get it down to 20 lines or so, you could post it here or in the bugs
| newsgroup and ask for help. As long as you're cutting out code while
| retaining the non-starting error, you'd be making progress.
|
| How long is the source code right now?
|
| -- 
| Justin (a/k/a jcc7)
| http://jcc_7.tripod.com/d/

Do you remember the Apollo library? It's not dead (or at least wasn't): I've 
kept making sure things compile and run, and adding a few things from time to 
time. But since DMD 0.102 I had this problem. So it's not very simple since it 
involves a Delphi DLL. Apparently it's not called, but I don't know how to
prove 
it. What I'm saying is, it's not easy to reduce. I just thought someone
might've 
had this problem before.

-----------------------
Carlos Santander Bernal 
Oct 07 2004
next sibling parent J C Calvarese <jcc7 cox.net> writes:
Carlos Santander B. wrote:
 "J C Calvarese" <jcc7 cox.net> escribió en el mensaje 
 news:ck4fnb$2stj$1 digitaldaemon.com...
 | Carlos Santander B. wrote:
 | > I need some help here. How am I supposed to debug an application which 
 doesn't
 | > even start? According to WinDbg it raises an unknown exception in 
 KiFastCall,
 | > when executing the instruction "sysenter". It doesn't even reach main or
the
 | > module ctors! Has anyone had that problem before? TIA.
 | >
 | > -----------------------
 | > Carlos Santander Bernal
 |
 | Sounds like a weird problem.
 |
 | I would suspect you could approach it the same as you would when trying
 | to isolate a small test case for reporting a compile-time bug. Whether
 | it's the compiler's fault or a mistake that you might have made, once
 | you get it down to 20 lines or so, you could post it here or in the bugs
 | newsgroup and ask for help. As long as you're cutting out code while
 | retaining the non-starting error, you'd be making progress.
 |
 | How long is the source code right now?
 |
 | -- 
 | Justin (a/k/a jcc7)
 | http://jcc_7.tripod.com/d/
 
 Do you remember the Apollo library? 
Sure.
 It's not dead (or at least wasn't): I've 
Cool.
 kept making sure things compile and run, and adding a few things from time to 
 time. But since DMD 0.102 I had this problem. So it's not very simple since it 
 involves a Delphi DLL. Apparently it's not called, but I don't know how to
prove 
If you haven't changed the DLL, it certainly could be something wrong with the latest D compiler. (Ah, the blame game...) Have you tried removing the dependency on the DLL? (Or does absolutely all of the program depend on the DLL?)
 it. What I'm saying is, it's not easy to reduce. I just thought someone
might've 
Yeah, I didn't realize a DLL was involved. If the DLL is involved, it's probably not easy to reduce.
 had this problem before.
 
 -----------------------
 Carlos Santander Bernal 
-- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Oct 07 2004
prev sibling parent Ant <Ant_member pathlink.com> writes:
In article <ck4r3n$gl1$1 digitaldaemon.com>, Carlos Santander B. says...
"J C Calvarese" <jcc7 cox.net> escribió en el mensaje 
news:ck4fnb$2stj$1 digitaldaemon.com...
| Carlos Santander B. wrote:
| > I need some help here. How am I supposed to debug an application which 
doesn't
| > even start? According to WinDbg it raises an unknown exception in 
KiFastCall,
| > when executing the instruction "sysenter". It doesn't even reach main or the
| > module ctors! Has anyone had that problem before? TIA.
| >
| > -----------------------
| > Carlos Santander Bernal
|
| Sounds like a weird problem.
|
| I would suspect you could approach it the same as you would when trying
| to isolate a small test case for reporting a compile-time bug. Whether
| it's the compiler's fault or a mistake that you might have made, once
| you get it down to 20 lines or so, you could post it here or in the bugs
| newsgroup and ask for help. As long as you're cutting out code while
| retaining the non-starting error, you'd be making progress.
|
| How long is the source code right now?
|
| -- 
| Justin (a/k/a jcc7)
| http://jcc_7.tripod.com/d/

Do you remember the Apollo library? It's not dead (or at least wasn't): I've 
kept making sure things compile and run, and adding a few things from time to 
time. But since DMD 0.102 I had this problem.
So you didn't change a thing. Mine compiles and runs correctly on linux but not on windows (XP no 2000). This is a compiler bug the applications should reach main or issue an error. My main and all static constructors have a printf as first statment. I'm posting a link to this on the bugs group. Ant
Oct 08 2004
prev sibling next sibling parent Ant <Ant_member pathlink.com> writes:
In article <ck4efu$2rr5$1 digitaldaemon.com>, Carlos Santander B. says...
I need some help here. How am I supposed to debug an application which doesn't 
even start? According to WinDbg it raises an unknown exception in KiFastCall, 
when executing the instruction "sysenter". It doesn't even reach main or the 
module ctors! Has anyone had that problem before? TIA.

-----------------------
Carlos Santander Bernal 
I'm sure you know this but as this is public let me just remind every body that the static constructores are executed before the main function. Ant
Oct 07 2004
prev sibling parent reply Ant <Ant_member pathlink.com> writes:
In article <ck4efu$2rr5$1 digitaldaemon.com>, Carlos Santander B. says...
I need some help here. How am I supposed to debug an application which doesn't 
even start? According to WinDbg it raises an unknown exception in KiFastCall, 
when executing the instruction "sysenter". It doesn't even reach main or the 
module ctors! Has anyone had that problem before? TIA.

-----------------------
Carlos Santander Bernal 
not before but since... right now. the difference is that I don't have a debuger. what do I do? this is windows 2000 dmd 0.102 can't create a small example. Ant
Oct 07 2004
parent "Carlos Santander B." <carlos8294 msn.com> writes:
"Ant" <Ant_member pathlink.com> escribió en el mensaje 
news:ck4rgb$gse$1 digitaldaemon.com...
| In article <ck4efu$2rr5$1 digitaldaemon.com>, Carlos Santander B. says...
| >
| >I need some help here. How am I supposed to debug an application which 
doesn't
| >even start? According to WinDbg it raises an unknown exception in KiFastCall,
| >when executing the instruction "sysenter". It doesn't even reach main or the
| >module ctors! Has anyone had that problem before? TIA.
| >
| >-----------------------
| >Carlos Santander Bernal
|
| not before but since... right now.
|
| the difference is that I don't have a debuger.
| what do I do?
| this is windows 2000 dmd 0.102
|
| can't create a small example.
|
| Ant
|
|

To download WinDbg go to 
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx.
To use it with D, compile with "-g". Then go to WinDbg and open the exe
(Ctrl+E) 
and then open whatever source file your interested in (Ctrl+O). Set
breakpoints, 
etc.

-----------------------
Carlos Santander Bernal 
Oct 07 2004