मैं जीडीबी में एक प्रोग्राम डीबग कर रहा हूं और मैं प्रोग्राम को रोकना चाहता हूं जब स्मृति क्षेत्र 0x08049000 से 0x0804a000 तक पहुंचा जा सके। जब मैं मैन्युअल ब्रेकपॉइंट्स मैन्युअल रूप से सेट करने का प्रयास करता हूं, तो gdb एक समय में दो से अधिक स्थानों का समर्थन नहीं करता है।जीडीबी में मेमोरी रेंज देखें?
(gdb) awatch *0x08049000
Hardware access (read/write) watchpoint 1: *0x08049000
(gdb) awatch *0x08049001
Hardware access (read/write) watchpoint 2: *0x08049001
(gdb) awatch *0x08049002
Hardware access (read/write) watchpoint 3: *0x08049002
(gdb) run
Starting program: /home/iblue/git/some-code/some-executable
Warning:
Could not insert hardware watchpoint 3.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
वहां पहले से ही एक सवाल जहां इस लिए कहा गया है और जवाब था, कि यह valgrind साथ ऐसा करना संभव हो सकता है। दुर्भाग्य से उत्तर में वाल्ग्रिंड मैनुअल के लिए कोई उदाहरण या संदर्भ नहीं है, इसलिए यह बहुत प्रबुद्ध नहीं था: How can gdb be used to watch for any changes in an entire region of memory?
तो: मैं पूरे मेमोरी क्षेत्र को कैसे देख सकता हूं?
दिलचस्प तथ्य यह है के लिए the Valgrind user manual on gdb integration देखें http://stackoverflow.com/questions/ 13410 9 41/सेट-ब्रेकपॉइंट-ऑन-हर-लाइन-इन-जीडीबी/31658056 # 31658056 –
x86 8 बाइट तक छोटी घड़ी श्रेणियों का समर्थन करता है: https://en.wikipedia.org/wiki/X86_debug_register –