Debugger Question

E

Easter Bunny

Dear group,

If/when my program crashes on a unix type OS, there is a core dump
written to disk that allows me to debug the problem *after* the
failing process has already terminated; I can even take the core
dump from the customer and analyze the problem on my developer
machine later.

One of our portable C programs crashes only when compiled for the
MS Windows operating system. We are using lcc-win32 for that.
In this environment, neither is there a core dump generated, nor
does the lcc-win32 debugger provide any facilities to read such a
thing.

How does one debug programs compiled with lcc-win32 post mortem?

Is there a general way, or is my problem platform specific?

Please help, I'm being under a lot of stress this time of the year.

Many thanks!
 
J

jacob navia

Easter said:
Dear group,

If/when my program crashes on a unix type OS, there is a core dump
written to disk that allows me to debug the problem *after* the
failing process has already terminated; I can even take the core
dump from the customer and analyze the problem on my developer
machine later.

One of our portable C programs crashes only when compiled for the
MS Windows operating system. We are using lcc-win32 for that.
In this environment, neither is there a core dump generated, nor
does the lcc-win32 debugger provide any facilities to read such a
thing.

How does one debug programs compiled with lcc-win32 post mortem?

Is there a general way, or is my problem platform specific?

Please help, I'm being under a lot of stress this time of the year.

Many thanks!

It is a difficult problem

1) You can set lcc-win32 as the default debugger by using the AEDebug
registry key.
2) If you still have a version of MSVC 4 (4.2 for instance) you can use
it as the default debugger for lcc-win32 compiled programs. Use the
same procedure as for (1)
3) You can use the Dr Watson utility from Microsoft to generate a run
time dump of the key variables and data. You should do this as your
first option, since it allows you to see where your program crashed
(The value of the EIP instruction pointer)
 
R

Richard Heathfield

Easter Bunny said:
Dear group,

If/when my program crashes on a unix type OS, there is a core dump
written to disk that allows me to debug the problem *after* the
failing process has already terminated; I can even take the core
dump from the customer and analyze the problem on my developer
machine later.

One of our portable C programs crashes only when compiled for the
MS Windows operating system.

Then it isn't really portable, is it? So fix it.
We are using lcc-win32 for that.
Why?

How does one debug programs compiled with lcc-win32 post mortem?

Read the code, understand it, and then fix it.
 
B

Ben Pfaff

Richard Heathfield said:
Easter Bunny said:

Then it isn't really portable, is it? So fix it.

That's a pretty cruel thing to say (at least if the OP were
sincere, which he isn't). Even a program designed to be portable
and found to work properly on N implementations can have bugs
that prevent it from working properly on implementation N + 1.
 
R

Richard Heathfield

Ben Pfaff said:
That's a pretty cruel thing to say (at least if the OP were
sincere, which he isn't).

Your parenthetical comment is highly relevant.
 
U

user923005

Ben Pfaff said:



Your parenthetical comment is highly relevant.

Be that as it may, it can be difficult to have code that is correct
for multiple platforms. We support basically everything here
(Mainframes, minicomputers, unix variants, Windows flavors, etc.) and
most real programs have to interact with the operating system for
things like directory services and communications [and other things
which are inherently non-portable]. Also, it is not unusual to find
that different compilers have their little quirks (e.g. we may not
have gcc for some machine so we have to use cc or some other compiler
and it may have some little quirk (or it may expose a quirk of gcc).
Portability is not a simple issue and it does require plenty of effort
to ensure that a program that is intended to be portable really fits
the requirements of portability that can be required. Since this
group has a lot of focus on portability, I think it is a good idea to
reply with sincerity, even if the OP is not sincere.

IMO-YMMV.
 
R

Richard Heathfield

user923005 said:

Since this
group has a lot of focus on portability, I think it is a good idea to
reply with sincerity, even if the OP is not sincere.

IMO-YMMV.

No, MMDNV - and my reply /was/ sincere. I agree that it wasn't terribly
kind, but it /was/ sincere.
 
J

jacob navia

user923005 said:
Ben Pfaff said:

Your parenthetical comment is highly relevant.

Be that as it may, it can be difficult to have code that is correct
for multiple platforms. We support basically everything here
(Mainframes, minicomputers, unix variants, Windows flavors, etc.) and
most real programs have to interact with the operating system for
things like directory services and communications [and other things
which are inherently non-portable]. Also, it is not unusual to find
that different compilers have their little quirks (e.g. we may not
have gcc for some machine so we have to use cc or some other compiler
and it may have some little quirk (or it may expose a quirk of gcc).
Portability is not a simple issue and it does require plenty of effort
to ensure that a program that is intended to be portable really fits
the requirements of portability that can be required. Since this
group has a lot of focus on portability, I think it is a good idea to
reply with sincerity, even if the OP is not sincere.

IMO-YMMV.

I do not understand why nobody mentions the THREE (yes THREE)
alternatives I proposed the OP to solve his problem.

He *can* have a core dump under windows. I told him its name,
he can install it without any difficulties...

I proposed other alternatives as well.
 
J

jacob navia

Ben said:
That's a pretty cruel thing to say (at least if the OP were
sincere, which he isn't). Even a program designed to be portable
and found to work properly on N implementations can have bugs
that prevent it from working properly on implementation N + 1.

I proposed 3 alternatives to the OP.

Why nobody cares about my answer?
 
I

Ian Collins

jacob said:
I proposed 3 alternatives to the OP.

Why nobody cares about my answer?
Probably because the OP is perceived as a troll.

Don't you think your little war with Mr Heathfield is getting out of hand?

I think you two should killfile each other and leave the rest of the
group in piece before it is irrecoverably damaged.
 
J

jacob navia

Ian said:
Probably because the OP is perceived as a troll.

Well, then why they are going on and on with this stuff,
as my compiler system had a bug?

That troll always says in this apparently innocent manner

Help!
I use lcc-win32 and it doesn't work... (insert some complaint here)

I answer proposing him several alternatives but my answer is ignored
and they go on discussing about the bugs in lcc-win!
Don't you think your little war with Mr Heathfield is getting out of hand?

I think you two should killfile each other and leave the rest of the
group in piece before it is irrecoverably damaged.

Look:

Somebody asks this morning for a random number generator
Heathfield answers with a sarcastic answer proposing him

int random(void) { return 0; }

Other people start laughing at the poor guy.

I get fed up, dig in my implementation the code of a
random number generator and post it to him.

Heatthfield says my code always return the same number.

I post him the code with the correct initialization but he
insists.

After a while, he posts a code piece saying that he can't
find the bug. Obviously, he initialized the seed to zero.

This is just bad faith!

Now you tell me:

"My little war against heathfield" ignoring all the context.
This is just helping him go on laughing at newcomers,
a favorite sport of this people here.
 
I

Ian Collins

jacob said:
Now you tell me:

"My little war against heathfield" ignoring all the context.
This is just helping him go on laughing at newcomers,
a favorite sport of this people here.
No, I clearly said "with Mr Heathfield". Not against, with. It takes
two to tango.

Try and ignore each other for a couple of days.
 
S

Sjouke Burry

Ian said:
No, I clearly said "with Mr Heathfield". Not against, with. It takes
two to tango.

Try and ignore each other for a couple of days.
Hear, hear!!!!!! :) :)
 
R

Richard

Ian Collins said:
No, I clearly said "with Mr Heathfield". Not against, with. It takes
two to tango.

Try and ignore each other for a couple of days.

Don't be ridiculous. It's all one way - Heathfield is an arrogant
egomaniac who picks at Jacob's posts day in day out. It is quite clear
to anyone without an agenda that Heathfield frequently misrepresents
Jacob's point sin order to appear superior. Jacob defending himself is
not having a "war with" IMO in this context.
 
H

Hans Schneider

Richard said:
Ben Pfaff said:


Your parenthetical comment is highly relevant.

jacob said:
That troll always says in this apparently innocent manner

Great, now you two have insulted and possibly drived away the Easter Bunny!

It's not like an important personality like that asks questions here
every day!
 
R

Richard Heathfield

Hans Schneider said:

Great, now you two have insulted and possibly drived away the Easter
Bunny!

It's not like an important personality like that asks questions here
every day!

No harm done, really - right now he's far too busy to post here.
 
E

Erwin Lindemann

Great, now you two have insulted and possibly drived away the Easter Bunny!

It's not like an important personality like that asks questions here
every day!

ISO/IEC 9899:1999 neither denies nor confirms the existence of the
Easter Bunny; therefore, any discussion on that topic is not topical
on c.l.c <hic>.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Debugger. 11
Debugger 1
Hello world console program with lcc-win32 15
Debugger pains 1
program that ain't crash inside debugger 6
IDLE debugger questions 4
DDD debugger problem 2
My little contribution, C-Profiler 14

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top