Re: Windows Debugging

From: Daniel Wickes (
Date: 04/15/99


I'm not really sure I can help with pages to help you out with pages
explaining howto debug Windows apps, though I'd be content with the
informatiion you have below -- it's a pretty good start!

As for your output I imagine it crashes on the line it does because that's the
first time it tries to access the memory pointer you pass through in the line;

> **-- line pointed out as cause --**
> - castle.c -
>   case 'D':
>     act(monolog[path[index] - 'A'], FALSE, ch, 0, 0, TO_ROOM);
> <<<-----******

If it were me, I'd want to know what 'index' was...  If it was accessing
something outside the bounds of your array, for instance.  I am not sure what
you're having trouble interpreting, exactly.   You know the last function
called from what's on the stack, you know the line calling that [act()] and
you even get an idea of the precise line it crashes on.   I wish Windows were
this kind to me half the time; I seem to spend my time hunting through map
Adding some OutputDebugString()s with the necessary definitions, or your own
form of debug logging, should sort that out for you.

One thing /I/ would like to know is; can I set up MSVC (6.0) to do the
equivalent of a core dump, and how can I load that into the compiler, like I
would do with gdb?  I was thinking about shifting across to Windows (for
coding/testing only, the MUD will still run on BSD) but I find the core dumps

-- Daniel

> **-- the stack output --**
> act(char * 0x00640000, int 0x00000000, char_data * 0x01011120, obj_data *
> 0x00000000, void * 0x00000000, int 0x00000001) line 2218 + 9 bytes
> **-- error -**
> - str 0x00640000 ""
>   CXX0030: Error: expression cannot be evaluated
> **-- line pointed out as cause in function called --**
> void act(const char *str, int hide_invisible, struct char_data *ch,
>   struct obj_data *obj, const void *vict_obj, int type)
> {
>   struct char_data *to = NULL;
>   int to_sleeping;
>   if (!str || !*str)     <<<------  ***Pointing to this line
>     return;

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST