Article View: borland.public.cppbuilder.nativeapi
Article #14745BorDebug.dll & StackWalk
From: Eyyub Volkan �ektimur
Date: Mon, 04 Aug 2003 13:41
Date: Mon, 04 Aug 2003 13:41
51 lines
2808 bytes
2808 bytes
Hi,
I'm using StackWalk method to get stack info and plannig to use
BorDebug.dll to resolve symbol... names. I have a problem.
Stackwalk returns an address (i think an real addres at addrFlat mode)
and i don't know to convert it to offseted (logical) address. I resolved
some symbols from .tds file via BorDebug.dll and still working to understand
how it works.
How can i convert real (flat) address to logical addres ?;
I can get the names of procedures from .tds file by iterating and also
can get offset values. How can i find the related procedure name by having
real address.
Is there any documentation about these subjects ?
I'm using VirtualQuery to get MEMORY_BASIC_INFORMATION and it's
AllocationBase for base addr.
// addr is the search addr of stack that returned from StackWalk
rva = addr - AllocationBase; // RVA is offset from module load address
than examine the returned sections from VirtualQuery, we can find the
Segment and Offset values. Anyway, the found segment is right but offset is
little big number (like 0x15BE6). I can't find this offset in .tds file ,
the related procedures offset seems to be
10. sub section : BORDEBUG_SSTGLOBALSYM
Module : 00000000
Offset : 0000E654
Size : 0002896C
symOffset: 0000E674
symLength: 00000008
GPROCREF: DoSomething
refSymOffset :0000
browserOffset :0000
codeSegment :0001
codeOffset :0C74
my mind really is confused. how can i translate real address to logical
address ? or am i examing .tds file in wrong way ... ?
anything will help....
___________________________________
Eyyub Volkan �ektimur
Proya Software & Trade Inc.
Head of Core Development Department
Technical Details
Message-ID:
<3f2e627a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,bb1b3ffe18d74dde,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-04 06:47:07 PST From: "Eyyub Volkan �ektimur" <evcektimur@prokon.com.tr> Newsgroups: borland.public.cppbuilder.nativeapi Subject: BorDebug.dll & StackWalk Date: Mon, 4 Aug 2003 16:41:13 +0300 Lines: 53 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 213.232.9.4 Message-ID: <3f2e627a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060004474 213.232.9.4 (4 Aug 2003 06:41:14 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail