summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRashmica Gupta <rashmica.g@gmail.com>2018-05-15 13:42:07 +1000
committerAlistair Popple <alistair@popple.id.au>2018-05-17 16:01:58 +1000
commitc9e116fda27482618b859e8375691f70bac0f293 (patch)
tree70e2f62e0e539d211e30e63bd23f2619897fa4b4 /src
parentc4abce3af2bd041f45732c9fd2a807bf045dbbca (diff)
downloadpdbg-c9e116fda27482618b859e8375691f70bac0f293.tar.gz
pdbg-c9e116fda27482618b859e8375691f70bac0f293.zip
libpdbg: Add missing lazy probe in putmem
Without this patch, attempting to write to memory causes a segfault. Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mem.c b/src/mem.c
index 4f12dcf..815c1c7 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -60,6 +60,9 @@ static int putmem(uint64_t addr)
pdbg_for_each_class_target("adu", adu_target)
break;
+ if (pdbg_target_probe(adu_target) != PDBG_TARGET_ENABLED)
+ return 0;
+
buf = malloc(PUTMEM_BUF_SIZE);
assert(buf);
do {
OpenPOWER on IntegriCloud