Error In Re-setting Breakpoint Cannot Access Memory
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us cannot insert breakpoint error accessing memory Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Gdb Breakpoint Cannot Access Memory At Address
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error gdb cannot insert breakpoint error accessing memory address in re-setting breakpoint 1: Cannot access memory at address . What is the reason for getting this error up vote 0 down vote favorite I am trying to compile and debug my code, runs on gcc 4.8.1 and using gdb version 7.5.1. I
Gdb Break Cannot Access Memory At Address
am not sure what is causing this error, I cannot set a breakpoint or use start on gdb, all of them give the same (similar) error: Error in re-setting breakpoint 1: Cannot access memory at address 0xe0b01c I saw this answer gdb error in re-settings breakpoint (cannot access memory), but i am not using -fPIE, I am using -fPIC though, and 7.7.1 has same issue. Is this issue due to gdb/gcc version or some flags? I am using: -g -std=c++1 -D__GCC_EXPERIMENTAL_CXX0X__=1 c++ gdb breakpoints share|improve gdb cannot insert breakpoint cannot access memory at address this question edited Jun 20 at 2:44 user0370730 218 asked Jun 19 at 22:31 Rohit 11 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Is this issue due to gdb/gcc version or some flags? You didn't say whether you are setting breakpoint in the main executable, or in a shared library. The address: 0xe0b01c looks like it came from a shared library or a PIE executable. In any case, GCC version has nothing to do with this, but your GDB is quite old. The standard solution is to use (gdb) start, then enable to re-enable the breakpoint (by the time you stop on main, the PIE executable and all directly-linked shared libraries have been relocated to their final addresses). share|improve this answer answered Jun 20 at 9:04 Employed Russian 86.2k14118171 I did try running (gdb) start , which puts a temporary breakpoint and never hits it. Temporary breakpoint 2 at 0xe0a982: file main.cc, line 106 Error in re-setting breakpoint 1: Cannot access memory at address 0xe0a960 . None of the breakpoints i set hit . –Rohit Jun 20 at 14:26 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other qu
Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Gdb Cannot Access Memory At Address
About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Reverse Engineering beta Questions Tags Users Badges Unanswered Ask Question _ Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. Join them; it only http://stackoverflow.com/questions/37912485/error-in-re-setting-breakpoint-1-cannot-access-memory-at-address-what-is-the takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Set a breakpoint on GDB entry point for stripped PIE binaries without disabling ASLR up vote 8 down vote favorite 3 Given a position-independent, statically-linked, stripped binary, there does not appear to be a way in GDB http://reverseengineering.stackexchange.com/questions/8724/set-a-breakpoint-on-gdb-entry-point-for-stripped-pie-binaries-without-disabling to set a breakpoint at the entry point without disabling ASLR. break start and similar functions do not work, because there is no symbolic information set stop-on-solib-events 1 does not work as the binary is not dynamically linked break *0xdeadbeef for the entry point does not work, as the entry point is unresolved until the binary starts catch load does not work, as it does not load any libraries start does not work, as main is not defined and no libraries are loaded Without patching the binary, what mechanism can I use to break at the first instruction executed? Possible? Since a now-deleted response to the question said that a PIE statically-linked binary is impossible, a trivial example is the linker itself. It is statically linked. $ ldd /lib/x86_64-linux-gnu/ld-2.19.so statically linked It is executable. $ strace /lib/x86_64-linux-gnu/ld-2.19.so execve("/lib/x86_64-linux-gnu/ld-2.19.so", ["/lib/x86_64-linux-gnu/ld-2.19.so"], [/* 96 vars */]) = 0 brk(0) = 0x7ff787b3d000 writev(2, [{"Usage: ld.so [OPTION]... EXECUTA"..., 1373}], 1Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...] It is position-independent. $ readelf -h /lib/x86_64-linux-gnu/ld-2.19.so | grep DYN Type: DYN (Shared object file) Solutions It looks like this can be done with Python by utilizing some of the events made available: http://asciinema.org/
Re: "Cannot access memory at address 0x175f80" From: Andrew Greenlaw