[lldb-dev] Reading process memory
Greg Clayton
gclayton at apple.com
Thu Sep 25 10:47:29 PDT 2014
It should be easy for you to step through the SBProcess::ReadMemory() call and see what is going wrong. If the process is stopped, it should definitely be returning memory. You are sure you don't have thread race conditions where some other thread is resuming the process?
> On Sep 25, 2014, at 10:34 AM, Mikhail Sosonkin <mike at nanotick.net> wrote:
>
> Hello,
>
> I'm trying to read some memory from a stopped process. However, the
> read function errors out with "process is running" message even though
> SBProcess::GetState tells me that the process is stopped. The process
> was stopped because it hit a breakpoint.
>
> SBProcess(0x7fed13981600)::GetState () => stopped
> SBProcess(0x7fed13981600)::GetState () => stopped
> SBProcess(0x7fed13981600)::ReadMemory (addr=0x7fff5fc34000,
> dst=0x112eff900, dst_len=4096, SBError (0x0))...
> SBProcess(0x7fed13981600)::ReadMemory() => error: process is running
> SBProcess(0x7fed13981600)::ReadMemory (addr=0x7fff5fc34000,
> dst=0x112eff900, dst_len=4096, SBError (0x7fed12621ee0): error:
> process is running) => 0
>
> I have two questions:
> - Is this a bug/known issue? I'm using lldb library that comes with
> Xcode 5 version lldb-310.2.37 (though I read somewhere that these
> version numbers don't help you much).
>
> - Is there a mechanism to read memory of a running process?
>
> Thanks,
> Mike.
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
More information about the lldb-dev
mailing list