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

Before Posting...

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

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/


can not break on a memory region created by MapViewOfFile

yu_shangyu_shang Member Posts: 41
edited December 2022 in WINDBG

I have a user mode executable which setup a file mapping by following steps
1. CreateFileMapping (file handle is INVALID_HANDLE_VALUE)
2. MapViewOfFile (got a memory address)
I set a memory write break point on the returned address

ba w 4 addr

the debugger never break on this break point, but the content of the breaking region do changed. So how to break in this situation ? Many thanks!!

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,445

    Remember, that only breaks on those exact 4 bytes. Are you literally changing the first four bytes? Also remember that this only traps writes to this virtual address within this process. If the region is being written in another process, that will use a different virtual address and won't be trapped.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • yu_shangyu_shang Member Posts: 41

    @Tim_Roberts said:
    If the region is being written in another process, that will use a different virtual address and won't be trapped.

    got it. This is my case I've never met before. Thank you.

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!
Kernel Debugging 30 January 2023 Live, Online
Developing Minifilters 20 March 2023 Live, Online
Internals & Software Drivers 17 April 2023 Live, Online
Writing WDF Drivers 22 May 2023 Live, Online