Article View: borland.public.cppbuilder.nativeapi
Article #14609Re: BorDebug.dll & StackWalk
From: Michael Harris
Date: Mon, 04 Aug 2003 18:59
Date: Mon, 04 Aug 2003 18:59
44 lines
2908 bytes
2908 bytes
IIRC there is some mention in bordebug.h . how to calculate what you need.
snip from borgebug.h
You can go from segment:offset address in the debug info
to actual physical address during debugging in the
following way:
- find the base address of the loaded executable
- find the segment and offset of the piece of debug
info you are interested in. This can be a procedure,
thunk, data, etc.
- crack the pe-header, and find out the base offset
of the segment you are interested in
- Now add the base address of the executable, the
base offset of the segment, and the offset, and
you will have the physical address where the item
you are interested in is loaded at runtime.
"Eyyub Volkan ๏ฟฝektimur" wrote in message
> Firstly thank for interest;
>
> I've cracked PE-Header and get the sections from struct. In section struct
> there are start address of sections and end address'. So we can find that
> which segment contains the address. I ensure that the address is on 1.
> segment (also looked and confirmed by .map file) and the 1. segment begins
> from 0x1000 offset. so i subtract it (0x4980-0x1000=0x3980) from the
> segment's offset. but still this address is meaningless.
>
> when i cracked .tds file via bordebug.dll, called procedure
(DoSomething())
> is in one of the section that starts from (about 0xD400) (i'm not sure
> about the address because i'm at home now, but something like that) and
the
> sections offset is bigger than 0x3980 . also there is an function offset
> (about 0xD80) .
>
> Anyway i couldn't yet understand how can we get symbol name (proc.name)
from
> .tds file by getting address via StackWalk. BorDebug.dll publishes all the
> needed functions but i couldn't find the way...
>
>
>
Technical Details
Message-ID:
<3f2ead1a$1@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.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f2e627a@newsgroups.borland.com> <3f2e74c7@newsgroups.borland.com> <3f2e8540@newsgroups.borland.com> <3f2e9baa@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,bb1b3ffe18d74dde X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-04 12:04:52 PST Reply-To: "Michael Harris" <techonos-NO-SPAM-@attbi.com> From: "Michael Harris" <techonos@attbi.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f2e627a@newsgroups.borland.com> <3f2e74c7@newsgroups.borland.com> <3f2e8540@newsgroups.borland.com> <3f2e9baa@newsgroups.borland.com> Subject: Re: BorDebug.dll & StackWalk Date: Mon, 4 Aug 2003 13:59:51 -0500 Lines: 46 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: 12.237.128.131 Message-ID: <3f2ead1a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060023578 12.237.128.131 (4 Aug 2003 11:59:38 -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.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail