Re: Evolution

From: Herbert Kleebauer (klee_at_unibwm.de)
Date: 11/21/03


Date: Fri, 21 Nov 2003 23:25:13 +0100

Randall Hyde wrote:

> > If you would switch from write only mode to read/write mode
> > you would see it: A C compiler with optimization turned off
> > should not delete unused code.
>
> Show me in *any* language definition for C where it says this.
> Show me any definition for the C language that insists on the
> ability to turn optimization on or off. In fact, I'd like you to
> point out to me in the C language definition where it even says
> you have to allow the creation of "non-optimized" code.
>
> You're really joining the ranks of "The_Sage" with respect
> to your knowledge of the C language here. For fun, you
> should try posting this over in comp.lang.c. That would
> be about as much fun to watch as "The_Sage"'s attempt
> at claiming the C language doesn't require semicolons
> at the end of a statement.

Maybe it is my bad English, but I think there is a difference
between "should not delete" and "must not delete". I also think,
people should be polite to other when posting here, but you are
free to insult everyone. Also a C compiler is free to delete
any unused code or not to support different optimization levels.
But if he has different optimization levels and you use the
lowest level, then it really should not delete unused code (and
that is, what I wrote above).

> Now, I can use Soft-Ice under Windows. I can use the debug
> registers. Are you still going to claim that people should
> learn assembly under DOS because you can't access these
> register under Windows?

So let's take a look at the posting history:

> > (it is great if you can
> > use hardware breakpoints by using the processor debug registers
> > in your debugger).
>
> ????
> Hardware breakpoints are available in debuggers under Windows

    Then please tell me how (without modifying the task switch
    routine in Windows or running the debugger with CPL=0).

I said "use hardware breakpoints in your debugger" and not "use
a debugger which allows you to use hardware breakpoints". As
I already said in an other posting, it is a good idea for an
assembly programmer to write his own debugger. And the first
assembler program I wrote after finishing the assembler was a
debugger/disassembler (a TSR program which can be activated
any time by pressing a hot key). And it is really great if you
can use hardware breakpoints (I can use the debug registers only
when the TSR is executed in real mode DOS but not when it is
executed in a DOS box in Windows). And it really isn't a big
deal to write such a debugger for DOS. But I think it is not
possible for a single person to write a kernel mode debugger
for Windows (or why do you think Soft-Ice is so expensive?).

> Therefore, your assetion that
> one has to use DOS, because these registers are only available
> under DOS is false for two reasons - the registers are available
> in debuggers under Windows and, also, you don't need access
> to these register in order to debug applications.

I never made this assertion (read the posting history I
included above). I said, it is great if you can use hardware
breakpoints and not that you can't debug a program without
hardware breakpoints. And I said, it is easy to use hardware
breakpoints when the processor is in real mode and that there
is a big problem in Windows, because the debug registers are
not saved when a task switch occurs (see the MSDN article I
included in a previous posting). And this means, you can't
use the debug register in a debugger which runs as a normal
user process.
 

> Then again, I'm not the one about whom people are posting
> "Have you seen this guy's posts in the past? Just ignore him!"

?????????????



Relevant Pages

  • Re: Windbg: Disable user mode debugging
    ... >> This group is not applicable because of the win32 in the title. ... So you don't have 64-bit Windows. ... debugger is an extension to ntoskrnl and maybe the hal too. ... I do know that the kernel does not have ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Network printing - HowTo?
    ... Microsoft Windows Debugger Version 5.2.3790.3959 ... Please check your debugger configuration and/or network access. ... Guess I'm wondering if sharing my network printers off of a server is ...
    (microsoft.public.windowsxp.print_fax)
  • Re: blue screen error - Symbols can not be loaded...
    ... this error condition means that a kernel-mode ... You receive a "Stop 0x0000000A" error message in Windows XP ... Your debugger is not using the correct symbols ...
    (microsoft.public.windowsxp.general)
  • Re: Very bad crashes when debugging with Spy++
    ... with the NtUser code (the code that does `windowing` in the broader sense, ... you might past back the problem of a debugger needeing a message loop. ... >>>app, but there are no other symptons of it so it seems strange that it ... >> Microsoft MVP, Windows SDK ...
    (microsoft.public.vc.language)
  • Re: blue screen error - Symbols can not be loaded...
    ... this error condition means that a kernel-mode ... You receive a "Stop 0x0000000A" error message in Windows XP ... Your debugger is not using the correct symbols ...
    (microsoft.public.windowsxp.general)