How to get the right offset of a bit field member in extension?

Hi all,

I am implementing a WinDBG extension, and I need to get the offset of a member which happend to be a bit field. It seems the documented functions provided by IDebugSymbols interface could only provide the offset at the byte level. Is there a possbile method I can use to get which bit it is as the “dt” command did.

Thanks.

What happens if you use GetFieldOffset with the bitfield member as the
last name in the dot separated string?

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, August 29, 2007 03:48
To: Kernel Debugging Interest List
Subject: [windbg] How to get the right offset of a bit field member in
extension?

Hi all,

I am implementing a WinDBG extension, and I need to get the offset of a
member which happend to be a bit field. It seems the documented
functions provided by IDebugSymbols interface could only provide the
offset at the byte level. Is there a possbile method I can use to get
which bit it is as the “dt” command did.

Thanks.


You are currently subscribed to windbg as: xxxxx@evitechnology.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Well, it just return me the offset to the byte that the bitfield member reside in.

Thanks.

Bummer. I guessed that’s probably you had tried originally, but wasn’t
sure, so I threw it out there. These problems are really frustrating,
because, most likely, there is a simple way to do it, but it is not
documented and involves some bizarre format string or whatnot. A while
back I got tired of symbol problems like these and wrote a library that
uses DIA to do the symbol management, and this is what my extensions
import. It was a huge pain in the ass, ass DIA is not, in my opinion,
user friendly, not very well documented, but does have a complete
example. I also use it mostly for non WinDbg related symbol processing
so, overall it was worth it, but still irritating.

Good luck,

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, August 29, 2007 21:39
To: Kernel Debugging Interest List
Subject: RE:[windbg] How to get the right offset of a bit field member
in extension?

Well, it just return me the offset to the byte that the bitfield member
reside in.

Thanks.


You are currently subscribed to windbg as: xxxxx@evitechnology.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks. Maybe I will look into it later, but it might not be an option
now. But still, thanks. Guess I have to change something now.

On 8/30/07, Martin O’Brien wrote:
> Bummer. I guessed that’s probably you had tried originally, but wasn’t
> sure, so I threw it out there. These problems are really frustrating,
> because, most likely, there is a simple way to do it, but it is not
> documented and involves some bizarre format string or whatnot. A while
> back I got tired of symbol problems like these and wrote a library that
> uses DIA to do the symbol management, and this is what my extensions
> import. It was a huge pain in the ass, ass DIA is not, in my opinion,
> user friendly, not very well documented, but does have a complete
> example. I also use it mostly for non WinDbg related symbol processing
> so, overall it was worth it, but still irritating.
>
> Good luck,
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
> Sent: Wednesday, August 29, 2007 21:39
> To: Kernel Debugging Interest List
> Subject: RE:[windbg] How to get the right offset of a bit field member
> in extension?
>
> Well, it just return me the offset to the byte that the bitfield member
> reside in.
>
> Thanks.
>
> —
> You are currently subscribed to windbg as: xxxxx@evitechnology.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to windbg as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>