Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

Breakpoint angst

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Is anyone else seeing strange behavior when trying to set breakpoints with
the 3.0 flavors? Specifically, I'm able to set breakpoints just fine about
fifty percent of the time. The rest of the time either the breakpoints get
set some arbitrary number of lines after the point I want to set it at or
the breakpoints are unresolved. For the former, I've made sure the point
where the breakpoint is to be set is "real" code (i.e., not an inline). For
the latter, this seems to happen in certain modules and other modules (in
the same driver) are fine.

I've seen this with 3.0.0007 and 3.0.0010. If there's a solution, I'd like
to know about it.

--jerry



---
You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    I have had that problem when compiler optimizations confuse the debugger.
    I've also had that problem when the PDB doesn't match the binary. Other
    than that, the 3.x 'Bags have been great.

    Phil

    -----Original Message-----
    From: Jerry Kelley [mailto:[email protected]]
    Sent: Friday, June 22, 2001 10:46 AM
    To: Kernel Debugging Interest List
    Subject: [windbg] Breakpoint angst



    Is anyone else seeing strange behavior when trying to set breakpoints with
    the 3.0 flavors? Specifically, I'm able to set breakpoints just fine about
    fifty percent of the time. The rest of the time either the breakpoints get
    set some arbitrary number of lines after the point I want to set it at or
    the breakpoints are unresolved. For the former, I've made sure the point
    where the breakpoint is to be set is "real" code (i.e., not an inline). For
    the latter, this seems to happen in certain modules and other modules (in
    the same driver) are fine.

    I've seen this with 3.0.0007 and 3.0.0010. If there's a solution, I'd like
    to know about it.

    --jerry



    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com


    ---
    You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
  • Nathan_NesbitNathan_Nesbit Member Posts: 194
    Unresolved breakpoints can happen for 2 reasons:
    The correct symbols aren't loaded
    The module is not loaded

    The breakpoint on the wrong line would indicate to me that either
    The correct symbols aren't loaded
    The source does not match the symbols/code being used

    If you have a scenerio where you have correct symbols, etc and believe
    it is a debugger bug then please mail [email protected] with the
    info. The info that will give us the best chance of identifing the bug
    is:
    Complete description of behavior & expected results
    Output of the version command
    A dump of the target (see the .dump command)
    The relevant symbols (excluding OS symbols)
    Repro steps

    Thanks

    -----Original Message-----
    From: Barila, Phil [mailto:[email protected]]
    Sent: Friday, June 22, 2001 11:47 AM
    To: Kernel Debugging Interest List
    Subject: [windbg] RE: Breakpoint angst

    I have had that problem when compiler optimizations confuse the
    debugger.
    I've also had that problem when the PDB doesn't match the binary. Other
    than that, the 3.x 'Bags have been great.

    Phil

    -----Original Message-----
    From: Jerry Kelley [mailto:[email protected]]
    Sent: Friday, June 22, 2001 10:46 AM
    To: Kernel Debugging Interest List
    Subject: [windbg] Breakpoint angst



    Is anyone else seeing strange behavior when trying to set breakpoints
    with
    the 3.0 flavors? Specifically, I'm able to set breakpoints just fine
    about
    fifty percent of the time. The rest of the time either the breakpoints
    get
    set some arbitrary number of lines after the point I want to set it at
    or
    the breakpoints are unresolved. For the former, I've made sure the point
    where the breakpoint is to be set is "real" code (i.e., not an inline).
    For
    the latter, this seems to happen in certain modules and other modules
    (in
    the same driver) are fine.

    I've seen this with 3.0.0007 and 3.0.0010. If there's a solution, I'd
    like
    to know about it.

    --jerry



    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com


    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com

    ---
    You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Optimizations shouldn't be the issue because I'm testing with a checked
    build - all optimizations are turned off. The PDBs match the binaries.

    This has really been the only issue I've had with the 3.0 versions.

    -----Original Message-----
    From: Barila, Phil [mailto:[email protected]]
    Sent: Friday, June 22, 2001 1:47 PM
    To: Kernel Debugging Interest List
    Subject: [windbg] RE: Breakpoint angst


    I have had that problem when compiler optimizations confuse the debugger.
    I've also had that problem when the PDB doesn't match the binary. Other
    than that, the 3.x 'Bags have been great.

    Phil

    -----Original Message-----
    From: Jerry Kelley [mailto:[email protected]]
    Sent: Friday, June 22, 2001 10:46 AM
    To: Kernel Debugging Interest List
    Subject: [windbg] Breakpoint angst



    Is anyone else seeing strange behavior when trying to set breakpoints with
    the 3.0 flavors? Specifically, I'm able to set breakpoints just fine about
    fifty percent of the time. The rest of the time either the breakpoints get
    set some arbitrary number of lines after the point I want to set it at or
    the breakpoints are unresolved. For the former, I've made sure the point
    where the breakpoint is to be set is "real" code (i.e., not an inline). For
    the latter, this seems to happen in certain modules and other modules (in
    the same driver) are fine.

    I've seen this with 3.0.0007 and 3.0.0010. If there's a solution, I'd like
    to know about it.

    --jerry



    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com


    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com

    ---
    You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Make sure you aren't using the DDK with the buggy setenv.bat, which doesn't
    really disable optimizations in the checked build. From your Checked Build
    environment, if you look at the MSC_OPTIMIZATION environment variable, it
    should =/Oi /Od

    MSC_OPTIMIZATION=/Oi /Od

    If it isn't, then optimizations are happening. Fix the setenv.bat, and the
    optimizations will be turned off.

    -----Original Message-----
    From: Jerry Kelley [mailto:[email protected]]
    Sent: Friday, June 22, 2001 12:24 PM
    To: Kernel Debugging Interest List
    Subject: [windbg] RE: Breakpoint angst


    Optimizations shouldn't be the issue because I'm testing with a checked
    build - all optimizations are turned off. The PDBs match the binaries.

    This has really been the only issue I've had with the 3.0 versions.

    -----Original Message-----
    From: Barila, Phil [mailto:[email protected]]
    Sent: Friday, June 22, 2001 1:47 PM
    To: Kernel Debugging Interest List
    Subject: [windbg] RE: Breakpoint angst


    I have had that problem when compiler optimizations confuse the debugger.
    I've also had that problem when the PDB doesn't match the binary. Other
    than that, the 3.x 'Bags have been great.

    Phil

    -----Original Message-----
    From: Jerry Kelley [mailto:[email protected]]
    Sent: Friday, June 22, 2001 10:46 AM
    To: Kernel Debugging Interest List
    Subject: [windbg] Breakpoint angst



    Is anyone else seeing strange behavior when trying to set breakpoints with
    the 3.0 flavors? Specifically, I'm able to set breakpoints just fine about
    fifty percent of the time. The rest of the time either the breakpoints get
    set some arbitrary number of lines after the point I want to set it at or
    the breakpoints are unresolved. For the former, I've made sure the point
    where the breakpoint is to be set is "real" code (i.e., not an inline). For
    the latter, this seems to happen in certain modules and other modules (in
    the same driver) are fine.

    I've seen this with 3.0.0007 and 3.0.0010. If there's a solution, I'd like
    to know about it.

    --jerry



    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com


    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com

    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com


    ---
    You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Isn't it a known bug that setenv.bat, by default, leaves optimizations on
    even in a checked build?

    Check that setenv.bat is setting the environment up the way you think it
    should be.

    Tom Swanson
    XIOtech Corporation

    > -----Original Message-----
    > From: Jerry Kelley [mailto:[email protected]]
    > Sent: Friday, June 22, 2001 2:24 PM
    > To: Kernel Debugging Interest List
    > Subject: [windbg] RE: Breakpoint angst
    >
    >
    > Optimizations shouldn't be the issue because I'm testing with
    > a checked
    > build - all optimizations are turned off. The PDBs match the binaries.
    >
    > This has really been the only issue I've had with the 3.0 versions.
    >
    > -----Original Message-----
    > From: Barila, Phil [mailto:[email protected]]
    > Sent: Friday, June 22, 2001 1:47 PM
    > To: Kernel Debugging Interest List
    > Subject: [windbg] RE: Breakpoint angst
    >
    >
    > I have had that problem when compiler optimizations confuse
    > the debugger.
    > I've also had that problem when the PDB doesn't match the
    > binary. Other
    > than that, the 3.x 'Bags have been great.
    >
    > Phil
    >
    > -----Original Message-----
    > From: Jerry Kelley [mailto:[email protected]]
    > Sent: Friday, June 22, 2001 10:46 AM
    > To: Kernel Debugging Interest List
    > Subject: [windbg] Breakpoint angst
    >
    >
    >
    > Is anyone else seeing strange behavior when trying to set
    > breakpoints with
    > the 3.0 flavors? Specifically, I'm able to set breakpoints
    > just fine about
    > fifty percent of the time. The rest of the time either the
    > breakpoints get
    > set some arbitrary number of lines after the point I want to
    > set it at or
    > the breakpoints are unresolved. For the former, I've made
    > sure the point
    > where the breakpoint is to be set is "real" code (i.e., not
    > an inline). For
    > the latter, this seems to happen in certain modules and other
    > modules (in
    > the same driver) are fine.
    >
    > I've seen this with 3.0.0007 and 3.0.0010. If there's a
    > solution, I'd like
    > to know about it.
    >
    > --jerry
    >
    >
    >
    > ---
    > You are currently subscribed to windbg as: [email protected]
    > To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
    >
    >
    > ---
    > You are currently subscribed to windbg as: [email protected]
    > To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
    >
    > ---
    > You are currently subscribed to windbg as: [email protected]
    > To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
    >

    ---
    You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    You're right. At least in the 2195 DDK, MSC_OPTIMIZATION is cleared on
    checked builds - the same as in the free build. I changed it per your
    suggestion and optimizations where then truly disabled. I looked at
    SETENV.BAT in the 2481 DDK and it was corrected.

    Thanks for the information.

    --jerry

    -----Original Message-----
    From: Barila, Phil [mailto:[email protected]]
    Sent: Friday, June 22, 2001 3:20 PM
    To: Kernel Debugging Interest List
    Subject: [windbg] RE: Breakpoint angst


    Make sure you aren't using the DDK with the buggy setenv.bat, which doesn't
    really disable optimizations in the checked build. From your Checked Build
    environment, if you look at the MSC_OPTIMIZATION environment variable, it
    should =/Oi /Od

    MSC_OPTIMIZATION=/Oi /Od

    If it isn't, then optimizations are happening. Fix the setenv.bat, and the
    optimizations will be turned off.

    -----Original Message-----
    From: Jerry Kelley [mailto:[email protected]]
    Sent: Friday, June 22, 2001 12:24 PM
    To: Kernel Debugging Interest List
    Subject: [windbg] RE: Breakpoint angst


    Optimizations shouldn't be the issue because I'm testing with a checked
    build - all optimizations are turned off. The PDBs match the binaries.

    This has really been the only issue I've had with the 3.0 versions.

    -----Original Message-----
    From: Barila, Phil [mailto:[email protected]]
    Sent: Friday, June 22, 2001 1:47 PM
    To: Kernel Debugging Interest List
    Subject: [windbg] RE: Breakpoint angst


    I have had that problem when compiler optimizations confuse the debugger.
    I've also had that problem when the PDB doesn't match the binary. Other
    than that, the 3.x 'Bags have been great.

    Phil

    -----Original Message-----
    From: Jerry Kelley [mailto:[email protected]]
    Sent: Friday, June 22, 2001 10:46 AM
    To: Kernel Debugging Interest List
    Subject: [windbg] Breakpoint angst



    Is anyone else seeing strange behavior when trying to set breakpoints with
    the 3.0 flavors? Specifically, I'm able to set breakpoints just fine about
    fifty percent of the time. The rest of the time either the breakpoints get
    set some arbitrary number of lines after the point I want to set it at or
    the breakpoints are unresolved. For the former, I've made sure the point
    where the breakpoint is to be set is "real" code (i.e., not an inline). For
    the latter, this seems to happen in certain modules and other modules (in
    the same driver) are fine.

    I've seen this with 3.0.0007 and 3.0.0010. If there's a solution, I'd like
    to know about it.

    --jerry



    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com


    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com

    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com


    ---
    You are currently subscribed to windbg as: [email protected]
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com

    ---
    You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
    To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')@lists.osr.com
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 24 January 2022 Live, Online
Internals & Software Drivers 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online
Developing Minifilters 23 May 2022 Live, Online