🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17473

Re: access violation

#17473
From: Michel Corbin
Date: Wed, 12 Mar 2003 13:16
49 lines
2611 bytes
Hello,
Thanks very much for all this information.

> BCB can generate .map file for your project with functions names and their
> addresses -
my map file begins with :

 Start         Length     Name                   Class
 0001:00401000 0000239BEH _TEXT                  CODE
 0002:00425000 00000AEA4H _DATA                  DATA
 0003:0042FEA4 000000264H _BSS                   BSS
 0004:00000000 0000000A4H _TLS                   TLS

 what are BSS and TLS Classes ?

> section address ('CODE')+ RVA. Function that cause exception will have
> biggest
> address <= EIP, obviously. This itself will give you a clue. 

The problem is that all the adresses in the map file are very low in
comparison 
with the address (00422033) where the exception occured.

> I would recommend to set your own UnhandledExceptionFilter( ... ) and dump
> call tree for
> exception in it - having EBP with stack frame address you can "unwind"
> stack, because value
>  at this address is pointer to a previous stack frame and next value is
> caller address and so
> on. I use this for exception handling in general - my exception class
> generates stack
> trace with all relevant information. It's very useful for remote debugging,
> like in your case.

To do that, I have to read and understand a lot of things,
Must I use SetUnhandledExceptionFilter to achieve that ?
Is it necessary to change 
the 
 try{    } 
 catch (Exception &exception)
  {
    Application->ShowException(&exception);
  }
of the main file written by BCB into something like :
__try{    }
__except( ){   }

Best regards
Michel Corbin
Technical Details
Message-ID: <3E6F3321.D563CE7A@libertysurf.fr>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3E6D03CA.8ED100AA@libertysurf.fr> <3e6d1849$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,16758dfd28526654
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-12 12:48:06 PST
Message-ID: <3E6F3321.D563CE7A@libertysurf.fr>
Date: Wed, 12 Mar 2003 14:16:17 +0100
From: Michel Corbin <corbin.michel@libertysurf.fr>
X-Mailer: Mozilla 4.7 [fr] (Win95; U)
X-Accept-Language: fr,en,es-ES,it,de-DE,pt
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: access violation
References: <3E6D03CA.8ED100AA@libertysurf.fr> <3e6d1849$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.47.231.254
X-Trace: newsgroups.borland.com 1047475230 212.47.231.254 (12 Mar 2003 05:20:30 -0800)
Lines: 49
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail