Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6093867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:36:38+00:00 2026-05-23T12:36:38+00:00

Possible Duplicate: Can I set a breakpoint on 'memory access' in GDB? I have

  • 0

Possible Duplicate:
Can I set a breakpoint on 'memory access' in GDB?

I have a specific location in memory that is getting corrupted, and I’d like to be able to see exactly when things write to that location. Is there any way that I can make gdb break on memory access to that particular address?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:36:38+00:00Added an answer on May 23, 2026 at 12:36 pm

    Yes.
    Using Watchpoints:
    watch – only breaks on write (and only if the value changes)
    rwatch – breaks on read, and
    awatch – breaks on read/write.

    A more detailed brief from some internet sources:

    watch
    watch is gdb’s way of setting data breakpoints which will halt the execution of a program if memory changes at the specified location.

    watch breakpoints can either be set on the variable name or any address location.

    watch my_variable
    watch *0x12345678
    where 0x12345678 is a valid address.
    

    rwatch
    rwatch (read-watch) breakpoints break the execution of code when the program tries to read from a variable or memory location.

    rwatch iWasAccessed
    rwatch *0x12345678
    where 0x12345678 is a valid address.
    

    awatch
    awatch or access watches break execution of the program if a variable or memory location is written to or read from. In summary, awatches are watches and rwatches all in one. It is a handy way of creating one breakpoint than two separate ones.

    awatch *0x12345678
    where 0x12345678 is a valid address.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: PHP Can a client ever set $_SESSION variables? What I'd like to
Possible Duplicate: How to access a variable in a PHP class that is set
Possible Duplicate: How can I pre-set arguments in JavaScript function call? (Partial Function Application)
Possible Duplicate: How can I find the method that called the current method? I
Possible Duplicate: Remove CSS from a Div using JQuery we can set backgroung-image property
Possible Duplicate: How can I subtract a day from a python date? I have
Possible Duplicate: What is the Maximum Size that an Array can hold? i want
Possible Duplicate: How can I declare a thousand separator in read.csv? I actually have
Possible Duplicate: C# How can I set the color of text in a richtextbox?
Possible Duplicate: Can’t operator == be applied to generic types in C#? I've got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.